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

node-spop

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-spop - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

72

index.js

@@ -40,2 +40,9 @@ var client = require('./client.js');

var spop = {
/**
* @param {object} settings Setup parameters
* @param {string} settings.host Server hostname or ip address
* @param {number} settings.port Server port number
* @param {boolean} settings.debug Logs additional information if true
* @return {Promise}
*/
setup: function(settings) {

@@ -47,2 +54,7 @@ this.settings = settings;

/**
* @description Execute a command on the spop server. Returned promise will be resolved with server's response.
* @param {string} command Command to be executed on spop server
* @return {Promise}
*/
exec: function(command) {

@@ -65,2 +77,7 @@ return new Promise(function(resolve, reject) {

/**
* @description Replace the contents of the queue with the given Spotify URI (playlist, track or album only) and start playing
* @param {string} uri Spotify URI to be played
* @returns {Promise}
*/
uplay: function(uri) {

@@ -70,2 +87,7 @@ return this.exec('uplay ' + uri);

/**
* @description Add the given Spotify URI to the queue (playlist, track or album only)
* @param {string} uri Spotify URI to be enqueued
* @returns {Promise}
*/
uadd: function(uri) {

@@ -75,2 +97,6 @@ return this.exec('uadd ' + uri);

/**
* @description Start playing from the queue
* @returns {Promise}
*/
play: function() {

@@ -80,2 +106,6 @@ return this.exec('play');

/**
* @description Toggle pause mode
* @returns {Promise}
*/
pause: function() {

@@ -85,2 +115,7 @@ return this.exec('pause');

/**
* @description Go to position pos in the current track
* @param pos Position to seek (in miliseconds)
* @returns {Promise}
*/
seek: function(pos) {

@@ -90,2 +125,6 @@ return this.exec('seek ' + pos);

/**
* @description Toggle repeat mode
* @returns {Promise}
*/
repeat: function() {

@@ -95,2 +134,6 @@ return this.exec('repeat');

/**
* @description Toggle shuffle mode
* @returns {Promise}
*/
shuffle: function() {

@@ -100,2 +143,7 @@ return this.exec('shuffle');

/**
* @description Switch to track number tr in the queue
* @param tr Number of the track
* @returns {Promise}
*/
goto: function(tr) {

@@ -105,2 +153,6 @@ return this.exec('goto ' + tr);

/**
* @description Switch to the next track in the queue
* @returns {Promise}
*/
next: function() {

@@ -110,2 +162,6 @@ return this.exec('next');

/**
* @description Switch to the previous track in the queue
* @returns {Promise}
*/
prev: function() {

@@ -115,2 +171,6 @@ return this.exec('prev');

/**
* @description List the contents of the queue
* @returns {Promise}
*/
qls: function() {

@@ -120,2 +180,6 @@ return this.exec('qls');

/**
* @description Stop playback
* @returns {Promise}
*/
stop: function() {

@@ -125,2 +189,6 @@ return this.exec('stop');

/**
* @description Display informations about the queue, the current track, etc.
* @returns {Promise}
*/
status: function() {

@@ -130,2 +198,6 @@ return this.exec('status');

/**
* @description Disconnect from the server
* @returns {Promise}
*/
end: function() {

@@ -132,0 +204,0 @@ return client.end();

2

package.json
{
"name": "node-spop",
"version": "1.0.0",
"version": "1.0.1",
"description": "Node wrapper for https://github.com/Schnouki/spop",

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

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