devices {Rduinoiot} | R Documentation |
Devices API methods
Description
List and show devices, events, properties associated to the user
Official documentation:
Usage
devices_list(
serial = NULL,
tags = NULL,
store_token = "option",
token = NULL,
silent = FALSE
)
devices_show(device_id, store_token = "option", token = NULL, silent = FALSE)
devices_get_events(
device_id,
limit = NULL,
start = NULL,
store_token = "option",
token = NULL,
silent = FALSE
)
devices_get_properties(
device_id,
show_deleted = FALSE,
store_token = "option",
token = NULL,
silent = FALSE
)
Arguments
serial |
serial number of the device you may want to filter from the list (not device_id) |
tags |
tags you may want to filter from the list |
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 |
device_id |
The id of the device (The arn of the associated device) |
limit |
The number of events to select |
start |
A |
show_deleted |
If |
Value
A tibble showing extensive information about devices (and related things) associated to the user
Examples
## Not run:
library(dplyr)
Sys.setenv(ARDUINO_API_CLIENT_ID = 'INSERT CLIENT_ID HERE')
Sys.setenv(ARDUINO_API_CLIENT_SECRET = 'INSERT CLIENT_SECRET HERE')
create_auth_token()
### check properties list ###
d_list = devices_list()
device_id = d_list %>% slice(1) %>% pull(id)
devices_show(device_id = device_id)
### get device events ###
devices_get_events(device_id = device_id)
### get device properties ###
devices_get_properties(device_id = device_id)
## End(Not run)