PurpleAir_checkAPIKey: Check the validity and type for the provided 'api_key'

View source: R/PurpleAir_API.R

PurpleAir_checkAPIKeyR Documentation

Check the validity and type for the provided api_key

Description

Sends a request to the PurpleAirAPI API endpoint described at: https://api.purpleair.com/#api-keys-check-api-key

Usage

PurpleAir_checkAPIKey(
  api_key = NULL,
  baseUrl = "https://api.purpleair.com/v1/keys"
)

Arguments

api_key

PurpleAir API key.

baseUrl

URL endpoint for the "Check Key" API.

Value

List containing key type information.

Examples


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

library(AirSensor2)

  PurpleAir_checkAPIKey(
    api_key = PurpleAir_API_READ_KEY
  )

}, silent = FALSE)


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