spotify-finder
A isomorphic Spotify client, that use the Client Credentials authorization flow. It allows to use some Spotify Web API endpoints.
Install
$ npm install spotify-finder
Usage
const client = consumer: key: 'YOUR_CLIENT_ID' // from v2.1.0 is required secret: 'YOUR_CLIENT_SECRET' // from v2.1.0 is required
Note: you have that provide the client credentials because from 29th May 2017 was removed unauthenticated calls to the Spotify Web API more info. Create an application in Spotify click here.
Search for all types
const params = q: 'Demi' // requiredclient
Search for type specific with limit
const params = q: 'Stone Cold' // required type: 'artist' // optional for default 'artist,album,track' limit: 5 // optional for default 20client
Get a List of New Releases
const params = to: 'new-releases' // required limit: 5 // optional for default 20 offset: 5 // optional for default 0client
Get a List of Featured Playlists
client
Get a List of Categories
client
Get a Category by id
client
Get a Category’s Playlists
const params = playlists: true // required limit: 5 // optional for default 20 offset: 5 // optional for default 0 country: 'BR' // optional for default 'SE'client
Get album by id
client
Get an album's tracks
client
Get several albums by id
const ids = '41MnTivkwTO3UUJ8DrqEJJ' '6UXCm6bOO4gFlDQZV5yL37'client
Get artist by id
client
Get an artist's albums
const params = albums: true // required album_type: 'album,single' // optional for default all types limit: 5 // optional for default 20 offset: 5 // optional for default 0client
Get an artist's top tracks
client
Get an artist's related artists
client
Get several artists by id
const ids = '15deb326635d69d0505434' '934da7155ec15deb32663'client
Get an track by id
client
Get several tracks by id
const ids = '15deb326635d69d0505s' 'da7155ec15deb326635d69d'client