Update page 'REST API'

RemixDev
2019-11-30 16:28:41 +00:00
parent 4f4d302a3d
commit fa1857bb99
+47
@@ -0,0 +1,47 @@
# REST API
## Add URLs to download queue via POST request:
``` JSON
POST http://localhost:1730/api/download/
Content-Type: application/json
{
"url": "https://www.deezer.com/album/115542362"
}
or
{
"url": ["https://www.deezer.com/track/812778162","https://www.deezer.com/playlist/708702152","https://www.deezer.com/track/813185722"]
}
```
## Search for a track, album, playlist or artist
``` JSON
POST http://localhost:1730/api/search/
Content-Type: application/json
{
"album": "my favourite album - my favouite artist"
}
or
{
"artist": "my favouite artist"
}
```
## Retrieve tracklist for an album, artist, playlist or spotifyplaylist
``` JSON
POST http://localhost:1730/api/tracks/
Content-Type: application/json
{
"album": "my favourite album's ID"
}
or
{
"artist": "my favouite artist's ID"
}
```
## Retrieve length of, and items in Download Queue
``` JSON
GET http://localhost:1730/api/queue/
```