node-rdio is a wrapper for the rdio web service api.
npm install rdio --save
Rdio is now requiring apps to switch over to OAuth 2.0. You can read more about that here. The gist of it is you will need to create a new app and change how your app interfaces with the node-rdio module.
Good news is the module is much simpler to use and setup.
HUGE thanks to help from @siboulet for bringing the module up to date. I've just gone in and merged it with my older v2.0 branch that was still using OAuth 1.0.
var Rdio = require'rdio'rdio:clientId: //client id from app manage pageclientSecret: //client secret from app manage page;// in a route or somewhere not globalvar rdio = /*tokens*/ /*options*/;
(optional) Tokens should be passed in via an object that contains an
(optional) Options can extend any of the defaults:
urls:auth: ''token: ''resource: ''rdio:clientId: ""clientSecret: ""
When requesting an access token, your app must redirect the user to a url similar to:
You can then take that code param and finalize the request:
rdiogetAccessTokencode: requestquerycoderedirect: ''if errreturn replyerr;replyredirect'/user';;
If everything went right you should see the
refreshToken set. To check this you can call
For a more complete example checkout the example app in
You can now make calls that only require client authentication by using the
rdio.getClientToken method. See the example directory for usage.
Feel free to leave an issue if something is not working right. I've tested this with a few endpoints and it works, but there still may be some bugs lingering around.