R/gen_list_jobs.R

Defines functions gen_list_jobs

Documented in gen_list_jobs

#' Search for Current Jobs of Your User Account
#'
#' @description Function to list all current jobs connected to the given user.
#'
#' @param selection Filter the list of jobs for matching codes.
#' @param sortcriterion Allows to sort the resulting list of jobs by their Code ("content"), the time of completion ("time") or status ("status")
#' @param ... Additional parameter of the GENESIS API call. These parameters are only affecting the GENESIS API call itself, no further processing.
#'
#' @return A list of all current jobs connected to the given user.
#' @export
#'
gen_list_jobs <- function(selection = NULL,
                          sortcriterion = c("content", "time", "status"),
                          ...) {
  results_raw <- gen_api("catalogue/jobs",
    selection = selection,
    sortcriterion = sortcriterion,
    ...
  )

  results_json <- test_if_json(results_raw)

  return(results_json)
}

Try the restatis package in your browser

Any scripts or data that you put into this service are public.

restatis documentation built on July 9, 2023, 5:31 p.m.