isomorphic-spotify

0.1.5 • Public • Published

isomorphic-spotify

API library for the Spotify REST API.

Install

Install it with npm: npm install isomorphic-spotify

API

The following will return promises with response object being json

lookup: function({ type: 'artist OR album OR track', id: 'Spotify ID Hash' })
search: function({ type: 'artist OR album OR track', query: 'My search query', limit: 20 })
get: function(query) -- See http://developer.spotify.com/en/metadata-api/overview/

These won't return a promise. Setting a oauth token will make all subsequent api calls with token.

setOAuth: function(token) 
getOAuth: function() 

Example

var spotify = require('isomorphic-spotify');

spotify.search({ type: 'track', query: 'dancing in the moonlight' })
    .then(function(data) {
        // ... do something with data
    })
    .catch(function(err){
        // ... handle error
    });

Package Sidebar

Install

npm i isomorphic-spotify

Weekly Downloads

11

Version

0.1.5

License

none

Last publish

Collaborators

  • kizzlebot