Skip to content

Commit 30ce3b4

Browse files
authored
Reverted README
1 parent 4356671 commit 30ce3b4

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

api/README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33

44
This module depends on `librespot-core` and provides an API to interact with the Spotify client.
55

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

Comments
 (0)