README: Document new device-data API action

This commit is contained in:
Starbeamrainbowlabs 2019-01-19 21:19:06 +00:00
parent 39869afea0
commit 8bff9acbd8
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 11 additions and 0 deletions

View File

@ -106,6 +106,17 @@
### device-data
> Gets data by device given a start and end time.
Parameter | Type | Meaning
`device-id` | int | The id of the device to get data for.
`reading-type` | string | The type of reading to obtain data for.
`start` | datetime | The starting datetime.
`end` | datetime | The ending datetime.
`average-seconds` | int | Optional. If specified, readings will be grouped into lumps of this many seconds and averaged. For example a value of 3600 (1 hour) will return 1 data point per hour, with the value of each point an average of all the readings for that hour.
## Notes
- Readings are taken every 6 minutes as standard.