yfitops-web
A fork of the node.js implementation of the Spotify Web protocol
This module implements the "yfitops web" WebSocket protocol that is used on Spotify's Web UI.
This module is heavily inspired by the original open-source Python implementation: Hexxeh/spotify-websocket-api.
Installation
$ npm install yfitops-web
Example
Here's an example of logging in to the Spotify server and creating a session. Then requesting the metadata for a given track URI, and playing the track audio file through the speakers:
var lame = ;var Speaker = ;var Spotify = ;var uri = processargv2 || 'spotify:track:6tdp8sdXrXlPV6AZZN2PE8';// Spotify credentials...var username = processenvUSERNAME;var password = processenvPASSWORD;Spotify;
See the example
directory for some more example code.