mirror of https://github.com/Desuuuu/klipper.git
docs: Provide response_template in subscription examples in API_Server.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
bfcd5536fc
commit
6b23dd9ff1
|
@ -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"}}`
|
||||
|
||||
|
|
Loading…
Reference in New Issue