Giter Club home page Giter Club logo

rdio-python's Introduction

A Python library for accessing the Rdio web service API with OAuth
Including a command-line tool for making API requests

The command-line tool is called rdio-call:
% rdio-call get -i keys=t7609753
{
 "status": "ok",
 "result": {
  "t7609753": {
   "baseIcon": "album/6/8/a/000000000009ba86/square-200.jpg",
   "canDownloadAlbumOnly": true,
   "artistUrl": "/artist/Mogwai/",
   "duration": 303,
   "album": "Hardcore Will Never Die, But You Will",
   "isClean": false,
   "albumUrl": "/artist/Mogwai/album/Hardcore_Will_Never_Die%2C_But_You_Will/",
   "shortUrl": "http://rd.io/x/Qis2Qto",
   "canStream": true,
   "embedUrl": "http://rd.io/e/Qis2Qto",
   "type": "t",
   "price": "0.99",
   "trackNum": 1,
   "key": "t7609753",
   "icon": "http://media.rd.io/album/6/8/a/000000000009ba86/square-200.jpg",
   "canSample": true,
   "name": "White Noise",
   "isExplicit": false,
   "artist": "Mogwai",
   "url": "/artist/Mogwai/album/Hardcore_Will_Never_Die%2C_But_You_Will/track/White_Noise/",
   "albumKey": "a637574",
   "artistKey": "r80466",
   "canDownload": true,
   "length": 1,
   "canTether": true
  }
 }
}



The library is just called rdio. It include an Rdio class and a few exception classes:
>>> from rdioapi import Rdio
>>> state = {}
>>> r = Rdio(CONSUMER_KEY, CONSUMER_SECRET, state)
>>> from pprint import pprint
>>> pprint(r.get(keys='t7609753'))
{u't7609753': {u'album': u'Hardcore Will Never Die, But You Will',
               u'albumKey': u'a637574',
               u'albumUrl': u'/artist/Mogwai/album/Hardcore_Will_Never_Die%2C_But_You_Will/',
               u'artist': u'Mogwai',
               u'artistKey': u'r80466',
               u'artistUrl': u'/artist/Mogwai/',
               u'baseIcon': u'album/6/8/a/000000000009ba86/square-200.jpg',
               u'canDownload': True,
               u'canDownloadAlbumOnly': True,
               u'canSample': True,
               u'canStream': True,
               u'canTether': True,
               u'duration': 303,
               u'embedUrl': u'http://rd.io/e/Qis2Qto',
               u'icon': u'http://media.rd.io/album/6/8/a/000000000009ba86/square-200.jpg',
               u'isClean': False,
               u'isExplicit': False,
               u'key': u't7609753',
               u'length': 1,
               u'name': u'White Noise',
               u'price': u'0.99',
               u'shortUrl': u'http://rd.io/x/Qis2Qto',
               u'trackNum': 1,
               u'type': u't',
               u'url': u'/artist/Mogwai/album/Hardcore_Will_Never_Die%2C_But_You_Will/track/White_Noise/'}}


The Rdio object has methods begin_authentication, complete_authentication and logout to do OAuth authentication.

rdio-python's People

Contributors

dasevilla avatar ianloic avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.