diff --git a/REST API.md b/REST API.md new file mode 100644 index 0000000..2b915b0 --- /dev/null +++ b/REST API.md @@ -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/ +``` \ No newline at end of file