CommonJS Wrapper for Rdio JavaScript API.
rdio = require('rdio-js-api')('api-key-here', 'auth.html')
rdio.play('artist/Daft_Punk/album/Random_Access_Memories/track/Give_Life_Back_to_Music')
$ npm install rdio-js-api
rdio = require('rdio-api')('api-key-here', 'path/to/auth.html')
rdio.play('artist/Daft_Punk/album/Random_Access_Memories/track/Give_Life_Back_to_Music', function () {
// playing
})
rdio.onPlayStateChange(function(){
rdio.state().playing
// => true/false
})
rdio.request('getObjectFromUrl', { url: url }, function (error, track) {
rdio.playFromKey(track.key)
})
Loads the original Rdio SDK.
rdio.sdk(function (error, sdk) {
sdk.ready(function () {
sdk.play({ source: key })
})
})
Clone the repo first, and make sure you have all dependencies installed:
$ npm install
And run tests by calling the npm test
command:
$ npm test
This will start publishing the tests on :7559
. Visit localhost:7559
to run the tests in a browser.