Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yureien/splaying
SPlaying: Spotify now Playing API. Getting your current playing song or top artists/songs on Spotify has never been so easy.
https://github.com/yureien/splaying
music spotify spotify-api
Last synced: 6 days ago
JSON representation
SPlaying: Spotify now Playing API. Getting your current playing song or top artists/songs on Spotify has never been so easy.
- Host: GitHub
- URL: https://github.com/yureien/splaying
- Owner: Yureien
- License: mit
- Created: 2021-01-24T16:35:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T19:46:23.000Z (over 1 year ago)
- Last Synced: 2024-12-18T19:48:54.691Z (10 days ago)
- Topics: music, spotify, spotify-api
- Language: TypeScript
- Homepage: https://splaying.sohamsen.workers.dev
- Size: 33.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPlaying
SPlaying: Spotify now Playing, get your current playing song easily!New feature: Get your top artists or tracks too!
**API URL:** [splaying.sohamsen.workers.dev](https://splaying.sohamsen.workers.dev) (Yes, the homepage will just redirect to here)
## Registration
Go to [registration page](https://splaying.sohamsen.workers.dev/register) and login with your Spotify OAuth.
**Remember to save the user ID you get during registration since there is no way to get it back if lost!**
I don't save any identifying information (except IP address, for blocking spam).## API Reference
To get the response format, either check the code or just try it out. It's too big to neatly fit in here.
### Get Current Playing Song
**URL:** `/api/nowplaying/`
`` is the token you got during registration.
**Method:** `GET`
**URL Params:**
| Parameter | Description | Required | Allowed Values |
| --- | --- | --- | --- |
| `full` | Whether to return the full response (as obtained from Spotify, excluding some privacy-violating information) or a shortened version | No | `false` (default), `true` |### Get Top Artists or Tracks
**URL:** `/api/top/`
`` is the token you got during registration.
**Method:** `GET`
**URL Params:**
| Parameter | Description | Required | Allowed Values |
| --- | --- | --- | --- |
| `type` | Whether to return the top artists or tracks | Yes | `artists`, `tracks` |
| `full` | Whether to return the full response (as obtained from Spotify, excluding some privacy-violating information) or a shortened version | No | `false` (default), `true` |
| `limit` | Number of results to return | No | Any integer between 1 and 50 (default: 20) |
| `time_range` | Time range for the results | No | `long_term`, `medium_term` (default), `short_term` |
| `offset` | Index of the first result to return | No | Any integer >= 0 (default: 0) |## Live Example
Shameless self promotion of my site: [sohamsen.me](https://sohamsen.me/)
## Why?
Why not?
---
Thanks to [Aadi Bajpai's University Worker](https://github.com/aadibajpai/university) which made me think "why not make a useless but cool looking thingie using cloudflare workers too?"`