Sends a request to the PurpleAirAPI API endpoint described at: https://api.purpleair.com/#api-groups-create-group
PurpleAir_createGroup(
api_key = NULL,
name = NULL,
baseUrl = "https://api.purpleair.com/v1/groups"
)
PurpleAir API WRITE key.
Human readable name associated with the new group.
URL endpoint for the "Create Group" API.
List containing all members of the specified group.
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor2)
PurpleAir_createGroup(
api_key = PurpleAir_API_WRITE_KEY,
name = "My new group"
)
}, silent = FALSE)
#> Error in MazamaCoreUtils::stopIfNull(api_key) :
#> object 'PurpleAir_API_WRITE_KEY' not found
# }