diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-10-17 10:58:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-10-17 10:59:21 -0400 |
commit | 6b23dd9ff1bb8e58612323a1b0b5fc4310818f0a (patch) | |
tree | d8dc80a020cd540df5c7d6f68c5b1225fe849476 /docs/API_Server.md | |
parent | bfcd5536fcc3e434c3a3021936c8e95a9e151129 (diff) | |
download | kutter-6b23dd9ff1bb8e58612323a1b0b5fc4310818f0a.tar.gz kutter-6b23dd9ff1bb8e58612323a1b0b5fc4310818f0a.tar.xz kutter-6b23dd9ff1bb8e58612323a1b0b5fc4310818f0a.zip |
docs: Provide response_template in subscription examples in API_Server.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/API_Server.md')
-rw-r--r-- | docs/API_Server.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/API_Server.md b/docs/API_Server.md index 9122c806..bb46ce8f 100644 --- a/docs/API_Server.md +++ b/docs/API_Server.md @@ -188,7 +188,8 @@ This endpoint allows one to query and then subscribe to information from printer objects. The endpoint request and response is identical to the "objects/query" endpoint. For example: `{"id": 123, "method": "objects/subscribe", "params": -{"objects":{"toolhead": ["position"], "webhooks": ["state"]}}}` +{"objects":{"toolhead": ["position"], "webhooks": ["state"]}, +"response_template":{}}}` might return: `{"id": 123, "result": {"status": {"webhooks": {"state": "ready"}, "toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}}, @@ -245,7 +246,8 @@ after any pending G-Code commands complete. This endpoint is used to subscribe to G-Code terminal messages that are generated by Klipper. For example: -`{"id": 123, "method": "gcode/subscribe_output"}` +`{"id": 123, "method": "gcode/subscribe_output", "params": +{"response_template":{}}}` might later produce asynchronous messages such as: `{"params": {"response": "// Klipper state: Shutdown"}}` |