GIven that subscriptions are reset, connected clients no longer maintained and they cannot check "webhooks.state" to see if Klippy is ready. This notifcation may be used to in its place.
SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
Document the new server.websocket.id method and update the documentation for the subscription APIs.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Clients may provide arguments either in the query string or body. Reserved arguments "token" and "connection_id" are excluded from the result.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some requests, such "printer/objects/subscribe", require a websocket
for asynchronous updates. Clients may now specify a "connection_id"
in the form data that identifies an associated websocket.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
There is no need to pass the auth, server, or websocket manager objects to request handlers. They can be retreived directly from the application reference.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows clients to "unsubscribe"by sending an empty dict. Each client will receive updates only for subscribed objects.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This class encapsulates all request data received from a client. This simplifies callbacks and makes it easier to add additional parameters to a client request.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows regsitered methods to be coroutines. Execution is done on the event loop to prevent a coroutine from blocking the incoming command queue.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This is a better description of the item parsed from _convert_path() is a path relative to the "root" directory.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Previously different parts of the file manager referred to name identifying a "root directory" as either base or root. This could lead to confusion, so all references are now "root".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Since we need to walk through a file list each time one is requested there is no gain from storing lists locally.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Storage is now updated by individual calls to "parse_metadata()" instead of passing a full list. This will allow the manager to
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This updates the "PANELDUE_BEEP" gcode macro to use the "paneldue_beep" remote method. Also included is documentation on the "set_device_power" method added to the power plugin.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If extended==True is passed to GET directory then the result for each gcode file will include associate metadata, if present.
SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
Credit to GitHub user cdkeito for creating a template from which this implementation was inspired.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This documents the most useful printer objects available for query, providing the fields that a query returns and what the represent.
Also add a basic "print state monitoring" example and "bed_mesh" example to web_api.md.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>