diff --git a/API.md b/API.md index 03b716c..7aa4a03 100644 --- a/API.md +++ b/API.md @@ -43,3 +43,9 @@ The following events are emitted: - `volume`: The player volume changed, the following data is provided: - `value`: The volume, ranging from 0 to max - `max`: The max volume value +- `shuffle_context`: The player shuffling context setting changed + - `value`: Whether shuffling context is enabled +- `repeat_context`: The player repeating context setting changed + - `value`: Whether repeating context is enabled +- `repeat_track`: The player repeating track setting changed + - `value`: Whether repeating track is enabled diff --git a/api-spec.yml b/api-spec.yml index 567df0d..1d7f377 100644 --- a/api-spec.yml +++ b/api-spec.yml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 0.0.1 + version: 0.0.8 title: go-librespot API description: go-librespot daemon API @@ -186,6 +186,54 @@ paths: type: number minimum: 0 required: true + responses: + 200: + description: Successful response + /player/repeat_context: + post: + description: Toggle repeating context + requestBody: + content: + application/json: + schema: + type: object + properties: + repeat_context: + description: Whether repeating context should be enabled + type: boolean + required: true + responses: + 200: + description: Successful response + /player/repeat_track: + post: + description: Toggle repeating track + requestBody: + content: + application/json: + schema: + type: object + properties: + repeat_track: + description: Whether repeating track should be enabled + type: boolean + required: true + responses: + 200: + description: Successful response + /player/shuffle_context: + post: + description: Toggle shuffling context + requestBody: + content: + application/json: + schema: + type: object + properties: + shuffle_context: + description: Whether shuffling context should be enabled + type: boolean + required: true responses: 200: description: Successful response \ No newline at end of file