spotify-local-control
Usage
var connect = require('spotify-local-control')
var client = connect()
client.play('spotify:track:0JhKJg5ejeQ8jq89UQtnw8')
client.pause()
client.resume()
client.status().then(res => console.log(res))
Can also be used on the command line:
$ spotify-local-control
Usage:
$ spotify-local-control <command>
Commands:
<default> Show usage
play <uri> Play a track
status Show artist and track
pause Pause the current track
resume Resume the current track
Examples:
$ spotify-local-control play spotify:track:0JhKJg5ejeQ8jq89UQtnw8
API
client = connect()
Initialize a new client.
client.play(spotifyUri, spotifyContext?)
Plays the given song by spotifyUri.
spotifyContext can be specified to display a
related song, playlist, album or artist.
client.pause()
Pauses the playback.
client.resume()
Resumes the playback.
client.status(returnOn?, returnAfter?)
Get status information about the local client.
Installation
$ npm install spotify-local-control
See Also
License
MIT