From 464f0cd83fd6f6d0db054f3b087b77165b025c2c Mon Sep 17 00:00:00 2001 From: Charlie Powell <31997505+cp2004@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:26:37 +0100 Subject: [PATCH] :pencil2: Additional file information properties documented Closes #2682 --- docs/api/datamodel.rst | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index 703c19c4e..da82c02e7 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -365,6 +365,14 @@ Files - 0..1 - :ref:`GCODE analysis information ` - Information from the analysis of the GCODE file, if available. Left out in abridged version. + * - ``prints`` + - 0..1 + - :ref:`Print history information ` + - Information about previous prints of the file. Left out if the file has never been printed. + * - ``statistics`` + - 0..1 + - :ref:`Print statistics information ` + - Statistics about the file, based on the previous print times. Left out if the file has never been printed. .. _sec-api-datamodel-files-fileabridged: @@ -506,6 +514,62 @@ References - The model from which this file was generated (e.g. an STL, currently not used). Never present for folders. +.. _sec-api-datamodel-files-prints: + +Print History +------------- + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``success`` + - 1 + - Number + - Number of successful prints + * - ``failure`` + - 1 + - Number + - Number of failed prints + * - ``last.date`` + - 1 + - Unix Timestamp + - Last date this file was printed + * - ``last.printTime`` + - 1 + - Float + - Last print time in seconds + * - ``last.success`` + - 1 + - Boolean + - Whether the last print was a success or not + +.. _sec-api-datamodel-files-stats: + +Print Statistics +---------------- + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``averagePrintTime`` + - 1 + - Object + - Object that maps printer profile names to the last print time of the file, in seconds + * - ``lastPrintTime`` + - 1 + - Object + - Object that maps printer profile names to the average print time of the file, in seconds + .. _sec-api-datamodel-access: Access control