Spotify Track Stream
Create a readable object stream of a Spotify user's saved tracks ("My Music").
Installation
$ npm install --save spotify-track-stream
Overview
The point of this module is to provide a Readable
stream that spits out Track
objects from the
spotify-web-api-node. It
will attempt to refresh the access token automatically when needed and will
page through all of the tracks via the limit
and offset
parameters of the
REST api until all tracks are fetched.
Make sure to have an understanding of the Spotify Authentication Flow to know how to get and handle the various tokens and codes.
Usage
;;; // Create an authenticated instance of the spotify APIlet spotify = clientId: '...' clientSecret: '...' accessToken: '...' refreshToken: '...'; let tracks = spotify; tracks
Testing
Someday.
License
MIT