Update v2_0_0.md

This commit is contained in:
Johannes Pohl 2017-03-16 11:14:10 +01:00 committed by GitHub
parent 39c133e41a
commit 6f6e1b31c1

View file

@ -3,6 +3,7 @@ Snapcast JSON RPC Control API
Snapcast can be controlled with a [JSON-RPC 2.0](http://www.jsonrpc.org/specification) API over a raw TCP-Socket interface on port 1705.
Single JSON Messages are new line delimited ([ndjson](http://ndjson.org/)).
For simple tests you can fire JSON commands on a telnet connection and watch Notifications coming in:
```json
@ -20,7 +21,9 @@ Escape character is '^]'.
In the following the supported Requests and Notifications are described.
The client that sends a "Set" command, will receive a Response while others will receive a Notification "On" event.
The client that sends a "Set" command will receive a Response, while the other connected control clients will receive a Notification "On" event.
Commands can be sent in a [Batch](http://www.jsonrpc.org/specification#batch). The server will reply with a Batch and send a Batch notification to the other clients. This way the volume of multiple Snapclients can be changed with a single Batch Request.
Clients should call `Server.GetStatus` to get the complete picture.
The Server JSON object contains a list of Groups and Streams. Every Group holds a list of Clients and a reference to a Stream. Clients, Groups and Streams are referenced in the "Set" commands by their `id`.
@ -261,6 +264,7 @@ The Server JSON object contains a list of Groups and Streams. Every Group holds
### Client.OnVolumeChanged
```json
{"jsonrpc":"2.0","method":"Client.OnVolumeChanged","params":{"id":"00:21:6a:7d:74:fc","volume":{"muted":false,"percent":74}}}```
```
### Client.OnLatencyChanged
```json