aqs_metadata {raqs}R Documentation

AQS API Meta Data service

Description

A collection of functions to fetch information about the AQS API. The main purpose of this service is to let you know the system is up before you run a long job.

Usage

aqs_metadata(
  aqs_filter = c("isAvailable", "revisionHistory", "fieldsByService", "issues"),
  aqs_variables = NULL,
  header = FALSE,
  ...
)

metadata_isavailable(...)

metadata_revisionhistory(
  email = get_aqs_email(),
  key = get_aqs_key(),
  header = FALSE,
  ...
)

metadata_fieldsbyservice(
  service,
  email = get_aqs_email(),
  key = get_aqs_key(),
  header = FALSE,
  ...
)

metadata_issues(
  email = get_aqs_email(),
  key = get_aqs_key(),
  header = FALSE,
  ...
)

Arguments

aqs_filter

A string specifying one of the service filters. NOT case-sensitive.

aqs_variables

A named list of variables to fetch data (e.g., state). Only necessary variables are passed to a specific endpoint (service/filter) to make a valid request.

header

A logical specifying whether the function returns additional information from the API header. Default is FALSE to return data only.

...

Reserved for future use.

email

A string specifying the email address of the requester. If you set your email and key with set_aqs_user, you don't have to specify this.

key

A string specifying the key matching the email address for the requester. If you set your email and key with set_aqs_user, you don't have to specify this.

service

A string specifying one of the services available (e.g., sampleData)

Details

aqs_metadata sends a request to the AQS API based on a user-provided filter using the following underlying functions:

Value

A data.frame containing parsed data or a named list containing header and data.

Examples

## Not run: 

## Set your API Key first using set_aqs_user to run the following codes

aqs_metadata(aqs_filter = "isAvailable")
metadata_isavailable() # equivalent to above

aqs_metadata("revisionHistory")
metadata_revisionhistory()

aqs_metadata("fieldsByService", aqs_variables = list(service = "annualData"))
metadata_fieldsbyservice(service = "annualData")

aqs_metadata("issues")
metadata_issues()

## End(Not run)


[Package raqs version 1.0.2 Index]