Skip to content

Commit

Permalink
update documentation to match httr2 program flow
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherDT committed Sep 25, 2023
1 parent eddd405 commit f19bb7e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions R/api_calls.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#'
#' Generate an API request given an endpoint and any relevant query parameters.
#'
#' @param endpoint A character string of the API endpoint to request.
#' @param endpoint A character string of the API endpoint to request. Can be a full url, or a relative endpoint for the QuantAQ API
#' @param qs_params Query string parameters.
#'
#' @examples
#' \dontrun{r <- quantaq_request("account")}
#'
#' # include named arguments for query params, e.g. to limit the response to the first 5 results:
#' \dontrun{r <- quantaq_request("devices/MOD-PM-00808/data", limit = 5)}
#' # include a named list for query params, e.g. to limit the response to the first 5 results:
#' \dontrun{r <- quantaq_request("devices/MOD-PM-00808/data", list(limit = 5))}
#'
#' @returns The parsed JSON from the API, including both data and metadata.
#'
Expand All @@ -36,7 +36,7 @@ quantaq_request <- function(endpoint, qs_params = NULL){
#'
#' Iterates over and collated all pages of the data.
#'
#' @param response_content Content from a \code{\link{request}()}
#' @param response_content JSON content from a [quantaq_request()] response
#'
#' @returns All collated pages of the data.
#'
Expand All @@ -58,7 +58,7 @@ paginate <- function(response_content){

#' Handle requests params
#'
#' A helper function to format the parameters that can be passed to \code{requests()}.
#' A helper function to format the parameters that can be passed to [requests()].
#'
#' @importFrom stringr str_split
#' @param ... Parameters to be translated to query string and passed to the request.
Expand Down
2 changes: 1 addition & 1 deletion man/format_params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/paginate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/quantaq_request.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f19bb7e

Please sign in to comment.