You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/README.md
+8-15Lines changed: 8 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,11 @@
3
3
4
4
This module depends on `librespot-core` and provides an API to interact with the Spotify client.
5
5
6
-
## Available endpoints
7
-
8
-
-`POST \player\load` Load a track from a given uri. The request body should contain two parameters: `uri` and `play`.
9
-
-`POST \player\pause` Pause playback.
10
-
-`POST \player\resume` Resume playback.
11
-
-`POST \player\next` Skip to next track.
12
-
-`POST \player\prev` Skip to previous track.
13
-
-`POST \player\set-volume` Set volume to a given `volume` value from 0 to 65536.
14
-
-`POST \player\volume-up` Up the volume a little bit.
15
-
-`POST \player\volume-down` Lower the volume a little bit.
16
-
17
-
## Example
18
-
19
-
`curl -X POST -d "uri=spotify:track:xxxxxxxxxxxxxxxxxxxxxx&play=true" http://localhost:24879/player/load`
20
-
6
+
## How it works
7
+
This API uses JSON over Websocket according to the [JSON-RPC 2.0 standard](https://www.jsonrpc.org/specification). Three method prefixes are available:
8
+
-`player`, just a placeholder
9
+
-`metadata`, allows to retrieve some useful data about tracks and playlist (more to come)
10
+
-`mercury`, allows to send requests with Mercury directly, therefore all URIs must start with `hm://`
11
+
12
+
## Client
13
+
You can find a suitable client [here](https://github.com/librespot-org/librespot-java/tree/master/api-client).
0 commit comments