2.4.0 • Published 7 years ago

osa-spotify v2.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

osa-spotify

npm.io npm.io npm.io

Control the Spotify desktop macOS app

Installation

Requires OSX 10.10 Yosemite.

npm install osa-spotify --save

Usage

var spotify = require('osa-spotify')

// Play a song with a specific Spotify URI
spotify.play('spotify:track:0FutrWIUM5Mg3434asiwkp')

// Pause playback
spotify.pause()

// Resume playback
spotify.play()

// Toggle playback (if paused, play; if playing, pause)
spotify.toggle()

// Play next track in current playlist
spotify.next()

// Play previous track in current playlist
spotify.back()

// Get info about the current track (title, artist, album, etc)
spotify.getCurrentTrack().then(console.log)

// Get info about the player state (play/pause, volume, shuffle, repeat)
spotify.getPlayerState().then(console.log)

// Note: All functions return promises that resolve when the operation completes
2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.1

9 years ago

1.0.0

9 years ago