series_batch {Rduinoiot} | R Documentation |
Batch queries API methods
Description
Returns the batch of time-series data or last data point for a property of given thing (note: this API method is bugged and waiting to be fixed by Arduino team. Here for completeness and future developments but would not suggest using it)
Official documentation:
Usage
series_batch_query(
from,
to,
interval = NULL,
Q,
SeriesLimit = NULL,
store_token = "option",
token = NULL,
silent = FALSE
)
series_batch_query_raw(
from,
to,
interval = NULL,
Q,
SeriesLimit = NULL,
store_token = "option",
token = NULL,
silent = FALSE
)
series_batch_last_value(
thing_id,
property_id,
store_token = "option",
token = NULL,
silent = FALSE
)
Arguments
from |
A |
to |
A |
interval |
(numeric) Resolutions in seconds (seems not to affect results) |
Q |
The query. (Not clear what this means but allows to chose among properties by filling in,
for instance, |
SeriesLimit |
Maximum number of values (seems not to affect results) |
store_token |
Where your token is stored. If |
token |
A valid token created with |
silent |
Whether to hide or show API method success messages (default |
thing_id |
The id of the thing |
property_id |
The id of the property |
Value
A tibble showing of time and value for properties
Examples
## Not run:
Sys.setenv(ARDUINO_API_CLIENT_ID = 'INSERT CLIENT_ID HERE')
Sys.setenv(ARDUINO_API_CLIENT_SECRET = 'INSERT CLIENT_SECRET HERE')
create_auth_token()
### series_batch_query ###
series_batch_query(from = "2022-08-15", to = "2022-08-22",
Q = "property.fbf34284-91f0-42be-bbf6-dd46cfb3f1e0")
### series_batch_query_raw ###
series_batch_query_raw(from = "2022-08-15", to = "2022-08-22",
Q = "property.fbf34284-91f0-42be-bbf6-dd46cfb3f1e0")
### series_batch_last_value ###
thing_id = "b6822400-2f35-4d93-b3e7-be919bdc5eba"
property_id = "fbf34284-91f0-42be-bbf6-dd46cfb3f1e0"
series_batch_last_value(thing_id = thing_id, property_id = property_id)
## End(Not run)