API docs: Add datetime=now keyword to fetch-data docs

This commit is contained in:
Starbeamrainbowlabs 2019-02-24 18:05:34 +00:00
parent 76b72d2457
commit 622b19392c
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,7 @@ The server-side API is accessed through `api.php`, and supports a number of GET
Parameter | Type | Meaning Parameter | Type | Meaning
--------------------|-----------|--------------------- --------------------|-----------|---------------------
`datetime` | date/time | Required. Specifies the date and time for which readings are desired. `datetime` | date/time | Required. Specifies the date and time for which readings are desired. For current data use the special keyword `now`.
`reading_type` | string | Required. Specifies the type of reading desired. `reading_type` | string | Required. Specifies the type of reading desired.
`format` | string | Optional. Specifies the format that the response will be returned in. Valid values: `json`, `csv`. Default: `json`. `format` | string | Optional. Specifies the format that the response will be returned in. Valid values: `json`, `csv`. Default: `json`.
@ -93,6 +93,7 @@ Examples:
``` ```
https://example.com/path/to/api.php?action=fetch-data&datetime=2019-01-03%2007:52:10&reading_type=PM10 https://example.com/path/to/api.php?action=fetch-data&datetime=2019-01-03%2007:52:10&reading_type=PM10
https://example.com/path/to/api.php?action=fetch-data&datetime=now&reading_type=PM10
``` ```
### list-devices ### list-devices