R/pa_API.R
pa_getMemberData.Rd
Sends a request to the PurpleAir API endpoint described at: https://api.purpleair.com/#api-groups-get-member-data
pa_getMemberData(
api_key = NULL,
group_id = NULL,
member_id = NULL,
fields = NULL,
baseUrl = "https://api.purpleair.com/v1/groups"
)
PurpleAir API READ key.
The group_id
of the requested group. This group must
be owned by the api_key
.
Unique member_id
for a sensor within group_id
.
Optional parameter specifying sensor data fields to return.
URL endpoint for the "Get Member Data" API.
List containing all recent data for a single sensor.
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor)
pa_getMemberData(
api_key = PURPLE_AIR_API_READ_KEY,
group_id = MY_GROUP_ID,
member_id = MY_MEMBER_ID
)
}, silent = FALSE)
#> Error in MazamaCoreUtils::stopIfNull(api_key) :
#> object 'PURPLE_AIR_API_READ_KEY' not found
# }