Class: GoogleReaderApi::User
- Inherits:
-
Object
- Object
- GoogleReaderApi::User
- Defined in:
- lib/google-reader-api-uniq/user.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
maybe someone would like to access the api for a user.
Instance Method Summary collapse
- #feeds ⇒ Object
- #info ⇒ Object
-
#initialize(options) ⇒ User
constructor
specify either the :email and :password or the :auth token you got in the past.
- #subscriptions ⇒ Object
Constructor Details
#initialize(options) ⇒ User
specify either the :email and :password or the :auth token you got in the past
-
the user’s email address for login purposes
- :password
-
the user’s password for login purposes
- :auth
-
the auth token you got from a previous authentication request if you provide this you do not need to provide the email and password
17 18 19 |
# File 'lib/google-reader-api-uniq/user.rb', line 17 def initialize() @api = GoogleReaderApi::Api::new end |
Instance Attribute Details
#api ⇒ Object (readonly)
maybe someone would like to access the api for a user
7 8 9 |
# File 'lib/google-reader-api-uniq/user.rb', line 7 def api @api end |
Instance Method Details
#feeds ⇒ Object
29 30 31 |
# File 'lib/google-reader-api-uniq/user.rb', line 29 def feeds subscriptions.feeds end |
#info ⇒ Object
21 22 23 |
# File 'lib/google-reader-api-uniq/user.rb', line 21 def info JSON[api.get_link "api/0/user-info"] end |
#subscriptions ⇒ Object
25 26 27 |
# File 'lib/google-reader-api-uniq/user.rb', line 25 def subscriptions @subscriptions ||= GoogleReaderApi::SubscriptionList.new @api end |