mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-22 11:35:43 -04:00
[README] Update JSON API documentation
- api/player/toggle - api/player/volume
This commit is contained in:
parent
343c583229
commit
f91df003fe
@ -23,7 +23,7 @@ JSON-Object model:
|
|||||||
| Method | Endpoint | Description |
|
| Method | Endpoint | Description |
|
||||||
| --------- | ------------------------------------------------ | ------------------------------------ |
|
| --------- | ------------------------------------------------ | ------------------------------------ |
|
||||||
| GET | [/api/player](#get-player-status) | Get player status |
|
| GET | [/api/player](#get-player-status) | Get player status |
|
||||||
| PUT | [/api/player/play, /api/player/pause, /api/player/stop](#control-playback) | Start, pause or stop playback |
|
| PUT | [/api/player/play, /api/player/pause, /api/player/stop, /api/player/toggle](#control-playback) | Start, pause or stop playback |
|
||||||
| PUT | [/api/player/next, /api/player/prev](#skip-tracks) | Skip forward or backward |
|
| PUT | [/api/player/next, /api/player/prev](#skip-tracks) | Skip forward or backward |
|
||||||
| PUT | [/api/player/shuffle](#set-shuffle-mode) | Set shuffle mode |
|
| PUT | [/api/player/shuffle](#set-shuffle-mode) | Set shuffle mode |
|
||||||
| PUT | [/api/player/consume](#set-consume-mode) | Set consume mode |
|
| PUT | [/api/player/consume](#set-consume-mode) | Set consume mode |
|
||||||
@ -93,6 +93,10 @@ PUT /api/player/pause
|
|||||||
PUT /api/player/stop
|
PUT /api/player/stop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```http
|
||||||
|
PUT /api/player/toggle
|
||||||
|
```
|
||||||
|
|
||||||
**Response**
|
**Response**
|
||||||
|
|
||||||
On success returns the HTTP `204 No Content` success status response code.
|
On success returns the HTTP `204 No Content` success status response code.
|
||||||
@ -111,6 +115,10 @@ curl -X PUT "http://localhost:3689/api/player/pause"
|
|||||||
curl -X PUT "http://localhost:3689/api/player/stop"
|
curl -X PUT "http://localhost:3689/api/player/stop"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X PUT "http://localhost:3689/api/player/toggle"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Skip tracks
|
### Skip tracks
|
||||||
|
|
||||||
@ -240,8 +248,10 @@ PUT /api/player/volume
|
|||||||
| Parameter | Value |
|
| Parameter | Value |
|
||||||
| --------------- | ----------------------------------------------------------- |
|
| --------------- | ----------------------------------------------------------- |
|
||||||
| volume | The new volume (0 - 100) |
|
| volume | The new volume (0 - 100) |
|
||||||
|
| step | The increase or decrease volume by the given amount (-100 - 100) |
|
||||||
| output_id | *(Optional)* If an output id is given, only the volume of this output will be changed. If parameter is omited, the master volume will be changed. |
|
| output_id | *(Optional)* If an output id is given, only the volume of this output will be changed. If parameter is omited, the master volume will be changed. |
|
||||||
|
|
||||||
|
Either `volume` or `step` must be present as query parameter
|
||||||
|
|
||||||
**Response**
|
**Response**
|
||||||
|
|
||||||
@ -253,6 +263,10 @@ On success returns the HTTP `204 No Content` success status response code.
|
|||||||
curl -X PUT "http://localhost:3689/api/player/volume?volume=50"
|
curl -X PUT "http://localhost:3689/api/player/volume?volume=50"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X PUT "http://localhost:3689/api/player/volume?step=-5"
|
||||||
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -X PUT "http://localhost:3689/api/player/volume?volume=50&output_id=0"
|
curl -X PUT "http://localhost:3689/api/player/volume?volume=50&output_id=0"
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user