Skip to content

🎶 Control a local spotify client via spotify-webhelper

License

Notifications You must be signed in to change notification settings

f-mer/spotify-local-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-local-control stability

npm version downloads js-standard-style

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

About

🎶 Control a local spotify client via spotify-webhelper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published