From 97ff9c979ee0bcd85582a60b09670896b1ef19a8 Mon Sep 17 00:00:00 2001 From: bubux Date: Sun, 21 Jul 2024 16:00:44 +0200 Subject: [PATCH] fix fix fix --- DESCRIPTION | 1 - R/gen_list_jobs.R | 24 ------------------------ man/gen_list_jobs.Rd | 27 ++++++++------------------- 3 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 R/gen_list_jobs.R diff --git a/DESCRIPTION b/DESCRIPTION index 241d582..381df66 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,6 @@ Imports: purrr Suggests: httptest2, - usethis, knitr, rmarkdown, testthat (>= 3.0.0), diff --git a/R/gen_list_jobs.R b/R/gen_list_jobs.R deleted file mode 100644 index e17d709..0000000 --- a/R/gen_list_jobs.R +++ /dev/null @@ -1,24 +0,0 @@ -#' 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) -} diff --git a/man/gen_list_jobs.Rd b/man/gen_list_jobs.Rd index b0f28d2..6899f90 100644 --- a/man/gen_list_jobs.Rd +++ b/man/gen_list_jobs.Rd @@ -1,41 +1,30 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/gen_jobs.R, R/gen_list_jobs.R +% Please edit documentation in R/gen_jobs.R \name{gen_list_jobs} \alias{gen_list_jobs} \title{gen_list_jobs} \usage{ gen_list_jobs( - selection = NULL, - sortcriterion = c("content", "time", "status"), - ... -) - -gen_list_jobs( - selection = NULL, - sortcriterion = c("content", "time", "status"), + database = c("genesis", "regio"), + sortcriterion = c("type", "time", "status", "code"), + flat = FALSE, ... ) } \arguments{ -\item{selection}{Filter the list of jobs for matching codes.} - -\item{sortcriterion}{Allows to sort the resulting list of jobs by their Code ("content"), the time of completion ("time") or status ("status")} - -\item{...}{Additional parameter of the GENESIS API call. These parameters are only affecting the GENESIS API call itself, no further processing.} - \item{database}{Character string. Indicator if 'genesis' or 'regionalstatistik.de' database is called. Default option is 'genesis'.} +\item{sortcriterion}{Character string. Indicator if the output should be sorted by 'type','time','status' or 'code'. This is a parameter of the API call itself. The default is 'type'.} + \item{flat}{Boolean. Should the function return a list with jobs and metadata ('FALSE') or just a flat data.frame ('TRUE')? Defaults to FALSE.} + +\item{...}{Additional parameters for the API call. These parameters are only affecting the call itself, no further processing. For more details see \code{vignette("additional_parameter")}.} } \value{ A list or data.frame (see parameter 'flat') of all current jobs of the user. - -A list of all current jobs connected to the given user. } \description{ Function to list all current jobs connected to the given user in the GENESIS or regionalstatistik.de database. Important note: For this function it is also possible to use \code{searchcriterion} parameter and \code{selection} parameter, making it possible to filter the job list based on 'type','time','status' or 'code'. For more details see \code{vignette("additional_parameter")}. - -Function to list all current jobs connected to the given user. } \examples{ \dontrun{