#' Track Progress of a Job
#'
#' Check what percentage of the job is digitized
#'
#' @param job_id ID for the job (which you get from related_job_id field of submit_batch)
#'
#' @export
#'
#' @references \url{https://shreddr.captricity.com/developer/}
#'
#' @examples \dontrun{
#' track_progress("job_id")
#' }
track_progress <- function(job_id = "") {
captr_CHECKAUTH()
if ( is.null(job_id) | identical(job_id, "")) stop("Provide a Valid Job ID.")
h <- new_handle()
handle_setopt(h, customrequest = "GET")
handle_setheaders(h, "Captricity-API-Token" = Sys.getenv("CaptricityToken"))
target_url <- paste0("https://shreddr.captricity.com/api/v1/job/", job_id)
tag_con <- curl_fetch_memory(target_url, handle = h)
tag <- fromJSON(rawToChar(tag_con$content))
tag
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.