View source: R/get-all-comments.R
get_all_comments | R Documentation |
This function automates the process of obtaining the metadata, including download links for attachments for all comments corresponding to a specific document or docket ID as multiple API calls will be necessary.
get_all_comments(endpoint, ..., key = NULL, quiet = TRUE, test = FALSE)
endpoint |
which endpoint you want the url to be based on. The options are "document", "comment", and "docket". Note that this will be the endpoint your parameters will be applied to (e.g. the posted date of the comment versus the posted date of the document). |
... |
arguments passed to |
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
|
quiet |
logical; FALSE if you want to see the progress of the function as it acquires detailed information for each comment. This is recommended if you are obtaining more than 500 comments, since this call will take over an hour to run due to rate limits for the API. |
test |
logical; to test if the output is as expected without using up many API calls. |
a data frame containing the comment metadata, including the download links
## Not run: # retrieve all comments for docket CMS-2014-0063 comments_CMS_2014_0063 <- get_all_comments(endpoint = "document", docketId = "CMS-2014-0063", test = TRUE) # retrieve all comments for document NIH-2007-0930-0001 comment_metadata <- get_all_comments(endpoint = "document", documentId="NIH-2007-0930-0001") # retrieve all comments for documents last modified between 2021-04-01 12:00:00 and # 2021-04-02 12:00:00 with search term 'privacy' comments <- get_all_comments(endpoint = "document", lastModifiedDate = c("2021-04-01 12:00:00", "2021-04-02 12:00:00"), quiet = FALSE, searchTerm = "privacy") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.