Skip to content

Commit ce241c0

Browse files
committed
update docs
1 parent ffdaae5 commit ce241c0

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

R/api.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#' @param status.handlers named list of specific HTTP statuses and a response
88
#' function to call in the case where that status is returned. Passed to the
99
#' [handleAPIresponse()] function.
10+
#' progress.handler an optional function that resolves errors raised
11+
#' during an async request. Passed to the [`pollProgress()`] function.
1012
#' @keywords internal
1113
crunchAPI <- function(http.verb, url, config = list(), status.handlers = list(), progress.handler = NULL, ...) {
1214
url ## force lazy eval of url
@@ -55,6 +57,8 @@ crDELETE <- function(...) crunchAPI("DELETE", ...)
5557
#' Do the right thing with the HTTP response
5658
#' @param response an httr response object
5759
#' @param special.statuses an optional named list of functions by status code.
60+
#' @param progress.handler an optional function that resolves errors raised
61+
#' during an async request
5862
#' @return The full HTTP response object, just the content, or any other
5963
#' status-specific action
6064
#' @importFrom httr content http_status

R/progress.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#' @param progress_url A Crunch progress URL
77
#' @param wait Number of seconds to wait between polling. This time is increased
88
#' 20 percent on each poll.
9+
#' @param error_handler An optional function that takes the status object
10+
#' when the progress is less than 0 (meaning the request failed)
911
#' @return The percent completed of the progress. Assuming the
1012
#' `options(crunch.timeout)` (default: 15 minutes) hasn't been reached, this
1113
#' will be 100. If the timeout is reached, it will be the last reported progress

man/crunchAPI.Rd

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/handleAPIresponse.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/pollProgress.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)