Skip to content

Commit

Permalink
docs: Add documentation for repeat/shuffle API and events
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Oct 19, 2023
1 parent c8c5a2d commit 49b8edc
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
6 changes: 6 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
50 changes: 49 additions & 1 deletion api-spec.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

0 comments on commit 49b8edc

Please sign in to comment.