extract_meta: Extract Metadata for Specific Documents or Comments

View source: R/extract-meta.R

extract_metaR Documentation

Extract Metadata for Specific Documents or Comments

Description

Extract Metadata for Specific Documents or Comments

Usage

extract_meta(link, key = NULL)

Arguments

link

a link of the form https://api.regulations.gov/v4/comments/COMMENT_ID_HERE for the comment endpoint or a link of the form https://api.regulations.gov/v4/comments/DOCUMENT_ID_HERE for the document endpoint. Detailed information will be obtained on the document or comment of the given ID.

key

the API key passed in the function call; this may be NULL if the user has chosen to set up the key as an environmental variable instead with the function set_datagov_key. You can use "DEMO_KEY" for a very limited number of calls if needed.

Value

a data frame containing the metadata for the comment or document ID, including, if present the attachment links.

Examples

## Not run: 
# get comment metadata for a specific comment
result_comment <- extract_meta("https://api.regulations.gov/v4/comments/NOAA-NMFS-2013-0095-0007")
# get comment metadata for a specific document
result_doc <- extract_meta("https://api.regulations.gov/v4/documents/NIH-2006-0048-0001")

## End(Not run)

q-w-a/regulationsgov documentation built on May 3, 2022, 8:23 p.m.