R/PurpleAir_API.R
PurpleAir_getMemberHistory.Rd
Sends a request to the PurpleAirAPI API endpoint described at: https://api.purpleair.com/#api-groups-get-member-history
PurpleAir_getMemberHistory(
api_key = NULL,
group_id = NULL,
member_id = NULL,
start_timestamp = NULL,
end_timestamp = NULL,
average = 10,
fields = PurpleAir_PAT_QC_FIELDS,
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
.
Desired start datetime (ISO 8601).
Desired end datetime (ISO 8601).
Temporal averaging in minutes performed by PurpleAir. One of: 0 (raw), 10, 30, 60 (hour), 360, 1440 (day).
Character string specifying which 'sensor data fields' to include in the response.
URL endpoint for the "Get Groups list" API.
Tibble with historical data for a single sensor.
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor2)
PurpleAir_getMemberData(
api_key = PurpleAir_API_READ_KEY,
group_id = MY_GROUP_ID,
member_id = MY_MEMBER_ID
)
}, silent = FALSE)
#> Error in MazamaCoreUtils::stopIfNull(api_key) :
#> object 'PurpleAir_API_READ_KEY' not found
# }