An API that connects to the Spotify API, tracks your personal listening habits and publishes them through WebSockets. Useful if you want to make your listening habits public, such as on a personal blog or on a dashboard.
Check out my habits »
Getting started is easy, run:
docker run -e SPOTIFY_ID="a_good_secret" -e SPOTIFY_SECRET="an_even_better_secret" -e SPOTIFY_REDIRECT_URI="https://your.awesome.website" jbwhitcombe/spotapi:latest
You'll need to then either manually GET* the code to /code with:
curl --location --request GET 'localhost:80/code?code=$CODE'
Once you've completed the code transfer, you won't need to do this again until the service restarts.
- We're using a GET instead of a more traditional POST to enable browser-based sharing of the code as requests are defaulted to GET, rather than relying on the terminal or Curl.
The Spotify API is limited in that it can only show music statistics when you're logged in and authorised. Instead, this wrapper will provide you with a link, login and then expose endpoints that mirror the Spotify API so you can check out and publish your listening habits in real time on your own blog, such as mine.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated because they'll help make me realise that my current approach is potentially garbage and make me a better engineer. I'm here to learn, so please, show me how it's done.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the DWTFYW licence.