things | R Documentation |
Create, Update, List, Show and Delete properties associated to a given thing
Official documentation:
things_create( device_id = NULL, thing_id = NULL, name = NULL, properties = NULL, timezone = NULL, force = FALSE, store_token = "option", token = NULL, silent = FALSE ) things_update( device_id = NULL, thing_id = NULL, name = NULL, properties = NULL, timezone = NULL, force = FALSE, store_token = "option", token = NULL, silent = FALSE ) things_list( device_id = NULL, thing_id = NULL, show_deleted = FALSE, show_properties = FALSE, tags = NULL, store_token = "option", token = NULL, silent = FALSE ) things_show( thing_id, show_deleted = FALSE, store_token = "option", token = NULL, silent = FALSE ) things_delete( thing_id, force = FALSE, store_token = "option", token = NULL, silent = FALSE )
device_id |
The id of the device (The arn of the associated device) |
thing_id |
The id of the thing |
name |
The friendly name of the thing |
properties |
A tibble with the following columns (see
|
timezone |
A time zone name. Check |
force |
(logical) If |
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 |
show_deleted |
(logical) If |
show_properties |
(logical) If |
tags |
tags you may want to filter from the list |
A tibble showing information about chosen thing or list of thing for current user
## 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() ### create thing ### things_create(name = "test") ### check things list ### t_list = things_list(silent = TRUE) thing_id = t_list %>% filter(name == "test") %>% pull(id) things_show(thing_id = thing_id) ### update thing ### properties = tibble(name = c("test1", "test2"), permission = rep("READ_ONLY", 2), type = rep("FLOAT", 2), update_strategy = rep("ON_CHANGE", 2), update_parameter = rep(10, 2)) things_update(thing_id = thing_id, name = "test_update", properties = properties) ### delete thing ### things_delete(thing_id = thing_id) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.