From a953938c45f845fb9de14295dab6fde51bf713b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20W=C3=BCrthner?= Date: Wed, 26 Jan 2022 15:54:36 +0100 Subject: [PATCH] Improve timelapse documentation (#4349) * Improve timelapse documentation * Update with suggestinos * Add thumbnail filed --- docs/api/timelapse.rst | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/api/timelapse.rst b/docs/api/timelapse.rst index 66e0bb72e..ebe291e83 100644 --- a/docs/api/timelapse.rst +++ b/docs/api/timelapse.rst @@ -27,12 +27,17 @@ Retrieve a list of timelapses and the current config Delete a timelapse ================== -.. http:delete:: /api/timelapse/(string:filename) +.. http:delete:: /api/timelapse/(string:name) - Delete the timelapse ``filename``. + Delete the timelapse ``name``. + + Returns a :ref:`timelapse list ` in the + response body with the updated information. Requires the ``TIMELAPSE_DELETE`` permission. + :param unrendered: If provided and true, also include unrendered timelapses in the response + .. _sec-api-timelapse-render: Issue a command for an unrendered timelapse @@ -56,8 +61,13 @@ Delete an unrendered timelapse Delete the unrendered timelapse ``name``. + Returns a :ref:`timelapse list ` in the + response body. + Requires the ``TIMELAPSE_DELETE`` permission. + :param unrendered: If provided and true, also include unrendered timelapses in the response + .. _sec-api-timelapse-saveconfig: Change current timelapse config @@ -65,12 +75,19 @@ Change current timelapse config .. http:post:: /api/timelapse - Save a new :ref:`timelapse configuration ` to use for the next print. + Save a new :ref:`timelapse configuration ` to use for the next print. Set the optional ``save`` flag in the + configuration to ``true`` in order to make the new configuration persist accross restarts. The configuration is expected as the request body. + Returns a :ref:`timelapse list ` in the + response body. + Requires the ``TIMELAPSE_ADMIN`` permission. + :param unrendered: If provided and true, also include unrendered timelapses in the response + + .. _sec-api-timelapse-datamodel: Data model @@ -135,6 +152,10 @@ Rendered timelapse - 1 - string - URL for downloading the timelapse + * - ``thumbnail`` + - 1 + - string + - URL for downloading a thumbnail of the timelapse (optional) .. _sec-api-timelapse-datamodel-unrendered: @@ -196,6 +217,10 @@ Timelapse configuration - 1 - string - Type of the timelapse, either ``off``, ``zchange`` or ``timed``. + * - ``save`` + - 1 + - bool + - Optional flag to be included when when saving a configuration to make the configuration persist accross restarts Further fields are timelapse type specific, see below for details.