Sends a request to the PurpleAir API endpoint described at: https://api.purpleair.com/#api-groups-create-member

pa_createMember(
  api_key = NULL,
  group_id = NULL,
  sensor_index = NULL,
  baseUrl = "https://api.purpleair.com/#api-groups-create-member"
)

Arguments

api_key

PurpleAir API WRITE key.

group_id

The group_id of the requested group. This group must be owned by the api_key.

sensor_index

Sensor index as returned by pa_getSensorsData().

baseUrl

URL endpoint for the "Create Member" API.

Value

List containing data associated with this this sensor.

Examples

# \donttest{
# Fail gracefully if any resources are not available
try({

library(AirSensor)

  pa_getGroupDetail(
    api_key = PURPLE_AIR_API_READ_KEY,
    group_id = MY_GROUP_ID,
    sensor_index = MY_SENSOR_INDEX
  )

}, silent = FALSE)
#> Error in pa_getGroupDetail(api_key = PURPLE_AIR_API_READ_KEY, group_id = MY_GROUP_ID,  : 
#>   unused argument (sensor_index = MY_SENSOR_INDEX)
# }