Module: QuoraNotify
- Defined in:
- lib/quora_notify/base.rb,
lib/quora_notify/cookie.rb,
lib/quora_notify/version.rb
Defined Under Namespace
Modules: CookieReaders, Exceptions
Classes: Cookie, Install, Notification
Constant Summary
collapse
- API_NOTIFICATION_PATH =
'http://api.quora.com/api/logged_in_user?fields=notifs'
- TMP_COOKIE_PATH =
'/tmp/quora_notifier'
- VERSION =
'0.0.14'
Class Method Summary
collapse
Class Method Details
.quora_notifications ⇒ Object
10
11
12
13
14
|
# File 'lib/quora_notify/base.rb', line 10
def quora_notifications
fetch_notifications_with_cookies quora_cookies do |notifications|
JSON.parse(notifications)
end
end
|
.run! ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/quora_notify/base.rb', line 16
def run!
notifications = begin
quora_notifications
rescue JSON::ParserError
[]
end
process notifications
end
|