Module: Lapse::Client::Users
- Included in:
- Lapse::Client
- Defined in:
- lib/lapse/client/users.rb
Overview
Client methods for working with users
Instance Method Summary collapse
-
#authenticate(twitter_access_token) ⇒ Hashie::Mash
Authenticates a user.
-
#me ⇒ Hashie::Mash
Get the current user.
Instance Method Details
#authenticate(twitter_access_token) ⇒ Hashie::Mash
Authenticates a user
Requires authenticatied client.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lapse/client/users.rb', line 13 def authenticate(twitter_access_token) result = post('authenticate', twitter_access_token: twitter_access_token) hash = { :user => result.body, :access_token => result.headers['x-access-token'] } case @result_format when :mashie Hashie::Mash.new(hash) else hash end end |
#me ⇒ Hashie::Mash
Get the current user
Requires authenticatied client.
36 37 38 |
# File 'lib/lapse/client/users.rb', line 36 def me get('me').body end |