0.0
No commit activity in last 3 years
No release in over 3 years
OmniAuth strategy for Rdio
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

OmniAuth Rdio

Rdio OAuth 1.0a Strategy for OmniAuth 1.0.

Installation

Add to your project Gemfile:

gem 'omniauth-rdio'

Usage

Read the OmniAuth 1.0 documentation for detailed instructions.

Pass your Rdio Application Key and Secret as arguments when initializing the provider.

For example, if using as middleware in a Rails app, add the following to an initializer:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :rdio, ENV['RDIO_APP_KEY'], ENV['RDIO_APP_SECRET']
end

Authentication Hash

Example of the provider's Auth Hash Schema (request.env['omniauth.auth']):

{
  "provider" => "rdio",
  "uid" => "aaa...",
  "info" => {
    "name" => "Gopal Patel",
    "nickname" => "nixme",
    "first_name" => "Gopal",
    "last_name" => "Patel",
    "image" => "http://cdn3.rd.io/user/no-user-image-square.jpg",
    "urls" => {
      "User" => "http://www.rdio.com/people/nixme/",
      "Collection" => "http://www.rdio.com/people/nixme/collection/",
      "Playlists" => "http://www.rdio.com/people/nixme/playlists/",
      "Following" => "http://www.rdio.com/people/nixme/people/following/",
      "Followers" => "http://www.rdio.com/people/nixme/people/followers/"
    }
  },
  "credentials" => {
    "token" => "123456...",                   # OAuth access token
    "secret" => "abcde..."                    # OAuth secret
  },
  "extra" => {
    "access_token" => <OAuth::AccessToken>,   # OAuth::AccessToken instance for making API requests.
    "raw_info" => {                           # Result of the currentUser Rdio Web Service call.
      "followingUrl" => "/people/nixme/people/following/",    # Includes all optional User fields
      "baseIcon" => "user/no-user-image-square.jpg",          #   except lastSongPlayed and
      "isTrial" => false,                                     #   lastSongPlayTime.
      "artistCount" => 64,
      "heavyRotationKey" => "eee...",
      "networkHeavyRotationKey" => "bbb...",
      "albumCount" => 114,
      "libraryVersion" => 406,
      "trackCount" => 1391,
      "type" => "s",
      "username" => "nixme",
      "collectionUrl" => "/people/nixme/collection/",
      "playlistsUrl" => "/people/nixme/playlists/",
      "key" => "aaa...",
      "collectionKey" => "ccc...",
      "followersUrl" => "/people/nixme/people/followers/",
      "icon" => "http://cdn3.rd.io/user/no-user-image-square.jpg",
      "displayName" => "Gopal Patel",
      "isUnlimited" => true,
      "firstName" => "Gopal",
      "url" => "/people/nixme/",
      "gender" => "m",
      "lastName" => "Patel",
      "isSubscriber" => true
    }
  }
}

Contributing

Patches and bug reports are welcome. Just send a pull request or file an issue. Project changelog.