# NOT RUN {
# Create and delete a Collection
auth <- setup_highbond(Sys.getenv('highbond_openapi'),
Sys.getenv('highbond_org'),
Sys.getenv('highbond_datacenter'))
name <- 'galvanizer Test Collection'
response <- create_results_collections(auth, name)
collection_id <- response$id[[1]]
response <- delete_results_collections(auth, collection_id)
# Create a Collection with attributes
myattr <- list(description = 'My first description')
response <- create_results_collections(auth, name, attributes = myattr)
collection_id <- response$id[[1]]
# Update a Collection with attributes
myattr <- list(name = 'galvanizer Super Test Collection', description = 'My second description')
response <- update_results_collections(auth, collection_id, attributes = myattr)
# Delete a Collection
response <- delete_results_collections(auth, collection_id)
# }
Run the code above in your browser using DataLab