From fa1857bb99cb15fd69a2156f2706f03aed47e52d Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 30 Nov 2019 16:28:41 +0000 Subject: [PATCH] Update page 'REST API' --- REST API.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 REST API.md 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