Class: OmniAuth::Strategies::FiveHundredPx
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::FiveHundredPx
- Defined in:
- lib/omniauth/strategies/500px.rb
Instance Method Summary collapse
-
#raw_info ⇒ Object
Return info gathered from the flickr.people.getInfo API call.
- #request_phase ⇒ Object
-
#user_info ⇒ Object
Provide the “Person” portion of the raw_info.
Instance Method Details
#raw_info ⇒ Object
Return info gathered from the flickr.people.getInfo API call
46 47 48 49 50 |
# File 'lib/omniauth/strategies/500px.rb', line 46 def raw_info @raw_info ||= MultiJson.decode(access_token.get('/v1/users.json').body) rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |
#request_phase ⇒ Object
58 59 60 61 |
# File 'lib/omniauth/strategies/500px.rb', line 58 def request_phase [:authorize_params] = {:perms => [:scope]} if [:scope] super end |
#user_info ⇒ Object
Provide the “Person” portion of the raw_info
54 55 56 |
# File 'lib/omniauth/strategies/500px.rb', line 54 def user_info @user_info ||= raw_info.nil? ? {} : raw_info["user"] end |