From f678576a1ad385607bb2dcb445ba24bf297cd9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 1 Mar 2018 15:26:03 +0100 Subject: [PATCH] Updated README.md --- server/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/README.md b/server/README.md index bc1bf5aa..76f75e75 100644 --- a/server/README.md +++ b/server/README.md @@ -4,6 +4,8 @@ Under ``` /server/apps/ ```, there are two files, ``` admin.js ``` and ``` clien ## REST +All PUT, DELETE and POST endpoints have a 5-second waitlimit for each command per client. The same with shuffling in a player, even when using the client and socket-connection. You'll get a response with Retry-After header for how long you have to wait. + Add song ``` @@ -19,6 +21,7 @@ POST /api/list/:channel_name/:video_id Returns 403 for bad authentication Returns 409 if the song exists +Returns 429 if you're doing too much of this request, with a Retry-After int value in the header. Returns 200 and the added song object if successful ``` @@ -32,6 +35,7 @@ DELETE /api/list/:channel_name/:video_id Returns 403 for bad authentication Returns 404 if the song doesnt exist +Returns 429 if you're doing too much of this request, with a Retry-After int value in the header. Returns 200 if successful ``` @@ -46,6 +50,7 @@ PUT /api/list/:channel_name/:video_id Returns 403 for bad authentication Returns 404 if the song doesnt exist Returns 409 if you've already voted on that song +Returns 429 if you're doing too much of this request, with a Retry-After int value in the header. Returns 200 and the added song object if successful ``` @@ -68,6 +73,7 @@ PUT /api/conf/:channel_name Returns 403 for bad authentication Returns 404 if the list doesn't exist +Returns 429 if you're doing too much of this request, with a Retry-After int value in the header. Returns 200 and the newly added configuration if successful ``` @@ -137,6 +143,13 @@ Still to come: SKIP and SHUFFLE RESTApi calls.. adminpass: AES-CBC-Pkcs7 with Base64 IV(PASSWORD) } +// Sends shuffle to the server +'shuffle', { + adminpass: AES-CBC-Pkcs7 with Base64 IV(PASSWORD), + channel: CHANNELNAME, + pass: USER_PASSWORD +} + // Sends skip message to server 'skip', { pass: AES-CBC-Pkcs7 with Base64 IV(PASSWORD),