PurpleAir_createGroup: Create a new group

View source: R/PurpleAir_API.R

PurpleAir_createGroupR Documentation

Create a new group

Description

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

Usage

PurpleAir_createGroup(
  api_key = NULL,
  name = NULL,
  baseUrl = "https://api.purpleair.com/v1/groups"
)

Arguments

api_key

PurpleAir API WRITE key.

name

Human readable name associated with the new group.

baseUrl

URL endpoint for the "Create Group" API.

Value

List containing all members of the specified group.

Examples


# 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)


MazamaScience/AirSensor2 documentation built on Oct. 31, 2024, 1:39 a.m.