This package has been deprecated

Author message:

deprecated

node-spotilocal

1.0.6 • Public • Published

[DEPRECATED] node-spotilocal

npm npm npm paypal

Simple wrapper class for Spotify app local webserver.


Install

Via npm [package]:

$ npm install node-spotilocal

Via yarn [package]:

$ yarn add node-spotilocal

Usage

// require lib
const Spotilocal = require("node-spotilocal");
 
// init lib
const spotify = new Spotilocal();
 
// [optional] get auth tokens from Spotify app or auth process will execute with first request
spotify._auth().then(tokens => {
    // ...
}).catch(console.error);
 
// play track
spotify.play("spotify:track:1qCQTy0fTXerET4x8VHyr9").then(console.log).catch(console.error);
 
// pause track
spotify.pause().then(console.log).catch(console.error);
 
// unpause track
spotify.unpause().then(console.log).catch(console.error);
 
// get app status on particular events (default: ["login", "logout", "play", "pause", "error", "ap"]) or after X seconds (default: 0; 0 = disabled)
spotify.status(["login", "logout", "play", "pause", "error", "ap"], 0).then(console.log).catch(console.error);
 
// [optional] revoke auth tokens
spotify._revoke();

License

MIT

Package Sidebar

Install

npm i node-spotilocal

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

7.78 kB

Total Files

4

Last publish

Collaborators

  • oliverfindl