From c652bed87138c6ebb874178dba6c7f87a5967f59 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Feb 2019 11:31:52 +0100 Subject: [PATCH 1/3] Add missing documentation about state in `jobs` endpoint --- docs/api/datamodel.rst | 19 +++++++++++++++++++ docs/api/job.rst | 8 ++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index a55554e9e..abf0ba2b9 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -219,6 +219,25 @@ Progress information - Integer - Estimate of time left to print, in seconds +.. _sec-api-datamodel-jobs-state: + +State information +----------------- + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - body + - 1 + - String + - A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused", + "Cancelling", "Error" or "Offline". + .. _sec-api-datamodel-files: File related diff --git a/docs/api/job.rst b/docs/api/job.rst index 338a10ea7..bc9d67a1e 100644 --- a/docs/api/job.rst +++ b/docs/api/job.rst @@ -212,7 +212,8 @@ Retrieve information about the current job "filepos": 337942, "printTime": 276, "printTimeLeft": 912 - } + }, + "state": "Printing" } :statuscode 200: No error @@ -243,4 +244,7 @@ Job information response - 1 - :ref:`sec-api-datamodel-jobs-progress` - Information regarding the progress of the current print job - + * - ``state`` + - 1 + - :ref:`sec-api-datamodel-jobs-state` + - Information regarding the state of the current print job From a15e2de251a2502bb285cc4f0bb0dd2cb664222b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Feb 2019 12:17:35 +0100 Subject: [PATCH 2/3] Fix datamodel structure --- docs/api/datamodel.rst | 33 ++++++++++++++------------------- docs/api/job.rst | 2 +- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index abf0ba2b9..62f530066 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -151,6 +151,20 @@ Temperature offset Job related =========== +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``state`` + - 1 + - String + - A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused", + "Cancelling", "Error" or "Offline". + .. _sec-api-datamodel-jobs-job: Job information @@ -219,25 +233,6 @@ Progress information - Integer - Estimate of time left to print, in seconds -.. _sec-api-datamodel-jobs-state: - -State information ------------------ - -.. list-table:: - :widths: 15 5 10 30 - :header-rows: 1 - - * - Name - - Multiplicity - - Type - - Description - * - body - - 1 - - String - - A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused", - "Cancelling", "Error" or "Offline". - .. _sec-api-datamodel-files: File related diff --git a/docs/api/job.rst b/docs/api/job.rst index bc9d67a1e..a38dda0cd 100644 --- a/docs/api/job.rst +++ b/docs/api/job.rst @@ -246,5 +246,5 @@ Job information response - Information regarding the progress of the current print job * - ``state`` - 1 - - :ref:`sec-api-datamodel-jobs-state` + - :ref:`sec-api-datamodel-jobs` - Information regarding the state of the current print job From 4dbb24ecd759d703b7af2bb61f3864235ecb5e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 28 Feb 2019 12:26:25 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=9D=20`state`=20is=20not=20a=20sub?= =?UTF-8?q?=20data=20model=20but=20a=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/datamodel.rst | 14 -------------- docs/api/job.rst | 5 +++-- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index 62f530066..a55554e9e 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -151,20 +151,6 @@ Temperature offset Job related =========== -.. list-table:: - :widths: 15 5 10 30 - :header-rows: 1 - - * - Name - - Multiplicity - - Type - - Description - * - ``state`` - - 1 - - String - - A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused", - "Cancelling", "Error" or "Offline". - .. _sec-api-datamodel-jobs-job: Job information diff --git a/docs/api/job.rst b/docs/api/job.rst index a38dda0cd..0c43e2b3b 100644 --- a/docs/api/job.rst +++ b/docs/api/job.rst @@ -246,5 +246,6 @@ Job information response - Information regarding the progress of the current print job * - ``state`` - 1 - - :ref:`sec-api-datamodel-jobs` - - Information regarding the state of the current print job + - String + - A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused", + "Cancelling", "Error" or "Offline".