Class: OmniAuth::Strategies::Rdio
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::Rdio
- Defined in:
- lib/omniauth/strategies/rdio.rb
Constant Summary collapse
- BASE_URL =
'http://www.rdio.com'
- EXTRA_USER_FIELDS =
All optional User fields except lastSongPlayed and lastSongPlayTime. See developer.rdio.com/docs/read/rest/types#User
'followingUrl,isTrial,artistCount,heavyRotationKey,networkHeavyRotationKey,albumCount,trackCount,username,collectionUrl,playlistsUrl,collectionKey,followersUrl,displayName,isUnlimited,isSubscriber'
Instance Method Summary collapse
-
#raw_info ⇒ Object
Rdio User object from the currentUser call See developer.rdio.com/docs/read/rest/Methods#currentUser.
Instance Method Details
#raw_info ⇒ Object
Rdio User object from the currentUser call See developer.rdio.com/docs/read/rest/Methods#currentUser
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/omniauth/strategies/rdio.rb', line 43 def raw_info @raw_info ||= begin json = access_token.post('http://api.rdio.com/1/', :method => 'currentUser', :extras => EXTRA_USER_FIELDS).body MultiJson.decode(json)['result'] end rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |