Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-spotilocal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-spotilocal - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "node-spotilocal",
"version": "1.0.2",
"version": "1.0.3",
"description": "Simple wrapper for Spotify local webserver.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -43,4 +43,4 @@ # node-spotilocal

// get current status
spotify.status().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);

@@ -47,0 +47,0 @@ // [optional] revoke auth tokens

/**
* node-spotilocal v1.0.2 (2018-05-17)
* node-spotilocal v1.0.3 (2018-05-19)
* Copyright 2018 Oliver Findl

@@ -139,6 +139,8 @@ * @license MIT

_revoke() {
return this.csrf = this.oauth = "";
this.csrf = "";
this.oauth = "";
return;
}
async status() {
async status(returnOn = ["login", "logout", "play", "pause", "error", "ap"], returnAfter = 0) {
try {

@@ -148,4 +150,4 @@ return await this._auth() && await this._json(this._url("/remote/status.json"), {

oauth: this.oauth,
returnafter: 0,
returnon: ["login", "logout", "play", "pause", "error", "ap"].join(",")
returnon: (!Array.isArray(returnOn) ? [].push(returnOn) : returnOn).join(","),
returnafter: !isNaN(returnAfter) ? parseInt(returnAfter) : 0
});

@@ -160,3 +162,3 @@ } catch(err) {

try {
return await this._auth() && await this._json(this._url("/remote/play.json?action=queue"), {
return await this._auth() && await this._json(this._url("/remote/play.json"), {
csrf: this.csrf,

@@ -163,0 +165,0 @@ oauth: this.oauth,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc