From 85151a5a5d2aafe99da076a6525864af4c12c7fb Mon Sep 17 00:00:00 2001 From: Johannes Pohl Date: Wed, 1 Mar 2017 19:54:44 +0100 Subject: [PATCH] Update v2_0_0.md --- doc/json_rpc_api/v2_0_0.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/json_rpc_api/v2_0_0.md b/doc/json_rpc_api/v2_0_0.md index 84100bfc..df46177e 100644 --- a/doc/json_rpc_api/v2_0_0.md +++ b/doc/json_rpc_api/v2_0_0.md @@ -1,8 +1,9 @@ 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: +For simple tests you can fire JSON commands on a telnet connection and watch Notifications coming in: ```json $ telnet localhost 1705 @@ -17,8 +18,11 @@ Escape character is '^]'. {"jsonrpc":"2.0","method":"Client.OnConnect","params":{"client":{"config":{"instance":1,"latency":0,"name":"","volume":{"muted":false,"percent":74}},"connected":true,"host":{"arch":"x86_64","ip":"127.0.0.1","mac":"00:21:6a:7d:74:fc","name":"T400","os":"Linux Mint 17.3 Rosa"},"id":"00:21:6a:7d:74:fc","lastSeen":{"sec":1488065507,"usec":820050},"snapclient":{"name":"Snapclient","protocolVersion":2,"version":"0.11.0-beta-1"}},"id":"00:21:6a:7d:74:fc"}} ``` -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. -Clients should call `Server.GetStatus` to get the complete picture. +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. +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`. ### Example JSON objects