FrontierPsychiatrist / node-spotify

A module for node.js to use libspotify.
MIT License
142 stars 20 forks source link

Call ready callback with an error if login fails #62

Closed FrontierPsychiatrist closed 10 years ago

FrontierPsychiatrist commented 10 years ago

Currently the only thing that happens is that an error message is printed on the screen.

FrontierPsychiatrist commented 10 years ago

New:

spotify.on({
  ready: function(err) {
    if(err) {
      console.log('Login failed: ', err);
    }
});
philipbulley commented 9 years ago

Would be great if you'd update the documentation to reflect the err being passed on http://www.node-spotify.com/api.html#spotify and especially the example on http://www.node-spotify.com/example.html

Thanks for the great work!

FrontierPsychiatrist commented 9 years ago

Yep, you're right, I'll update it. Thanks!

FrontierPsychiatrist commented 9 years ago

I've updated the example and made the documentation page (hopefully) more clear.