No commit activity in last 3 years
No release in over 3 years
HTTP API for controlling Spotify OSX client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

 Project Readme

SpotifyHttpRemote

Build Status

HTTP API for sending basic playback commands to a spotify client running on OSX.

Installation

Add this line to your application's Gemfile:

gem 'spotify_http_remote'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spotify_http_remote

Usage

Start server:

$ spotify_http_remote <port> - Default port is 8080

In development mode 'localhost' is the default hostname.

Switch to production mode and start sending commands from other devices on the network by setting RACK_ENV variable to 'production':

$ export RACK_ENV=production

To allow devices from outside your network to send requests to the client, the router needs to be configured to forward traffic to the client's local IP.

HTTP routes

Start playback: <your-domain>:<port>/play

Start playing The Beatles: <your-domain>:<port>/play?artist=beatles

Start playing Drive My Car by The Beatles: <your-domain>:<port>/play?artist=beatles&track=drive%20my%20car

Start playing the album Help: <your-domain>:<port>/play?album=Help!

Stop playback: <your-domain>:<port>/stop

Next track: <your-domain>:<port>/next

Previous track: <your-domain>:<port>/previous