Giter VIP home page Giter VIP logo

sparty's Introduction

sparty

Spotify Party! Let your friends add Spotify songs to your queue from their own devices.

How it works

This project exposes a very basic API with just a single endpoint: POST /enqueue:

curl -H "Authorization: Token <token>" -X "POST" "http://localhost:8080/enqueue?url=spotify:track:1301WleyT98MSxVHPZCA6M

The url can be obtained from Spotify, for example by performing a search.

Once spartyd receives this request, it does some very basic valiation and responds with a 204 No Content. The endpoint does NOT make a request to the Spotify Web API directly: it only accepts it for delivery. A job is created, and a worker will pick this up to actually send it over to Spotify.

Requirements

  • Go 1.13
  • Spotify premium account

Config

Simply build the daemon in cmd/spartyd and run it with these environment variables set:

  • PORT (optional, defaults to 8080: port to listen on for API requests)
  • SPARTY_AUTH_TOKEN (arbitrary token to authenticate with API by passing it in a header Authorization: Token <token>)
  • SPOTIFY_CLIENT_ID
  • SPOTIFY_CLIENT_SECRET
  • SPOTIFY_REFRESH_TOKEN

See this guide by Spotify to learn how to obtain these SPOTIFY_ values.

Final note

The Spotify Web API endpoint used to enqueue songs is still in beta, and is thus subject to change by Spotify without prior notice. This means this application may stop working at any moment. If it does and you'd like to fix it, the endpoint's documentation is the first place to look.

sparty's People

Contributors

epels avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.