if (FALSE) {
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()
thing_id = "b6822400-2f35-4d93-b3e7-be919bdc5eba"
### create property ###
things_properties_create(thing_id = thing_id,
name = "test", permission = "READ_ONLY", type = "FLOAT",
update_strategy = "ON_CHANGE", update_parameter = 10)
### check properties list ###
p_list = things_properties_list(thing_id = thing_id, show_deleted = FALSE)
property_id = p_list %>% filter(name == "test") %>% pull(id)
things_properties_show(thing_id = thing_id, property_id = property_id)
### update property ###
things_properties_update(thing_id = thing_id, property_id = property_id,
name = "test_update", permission = "READ_ONLY", type = "FLOAT",
update_strategy = "ON_CHANGE", update_parameter = 10)
### delete property ###
things_properties_delete(thing_id = thing_id, property_id = property_id)
}
Run the code above in your browser using DataLab