From 9afbfa4e7b101e3e9284361a2e343604998aa964 Mon Sep 17 00:00:00 2001 From: LiNk-NY Date: Tue, 23 Apr 2024 11:31:37 -0400 Subject: [PATCH] resolve NOTES for CRAN --- DESCRIPTION | 14 +++++++++----- R/operations.R | 5 ++--- R/print.R | 6 +++--- R/rapiclient.R | 3 +-- man/get_operation_definitions.Rd | 2 +- man/get_operations.Rd | 3 +-- man/get_parameters.Rd | 2 -- man/get_schema_graphviz_dot.Rd | 9 +++++++-- man/print.rapi_api.Rd | 2 +- man/print.rapi_operation.Rd | 2 +- man/print.rapi_schema_function.Rd | 2 +- man/rapiclient-package.Rd | 19 +++++++++++++++++++ man/result_handlers.Rd | 6 +++--- 13 files changed, 49 insertions(+), 26 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5910022..ccb3249 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,20 +2,24 @@ Package: rapiclient Type: Package Title: Dynamic OpenAPI/Swagger Client Version: 0.1.3 -Authors@R: person("Darko", "Bergant", email = "darko.bergant@gmail.com", - role = c("aut", "cre")) +Authors@R: c( + person("Darko", "Bergant", , "darko.bergant@gmail.com", c("aut", "cre")), + person("Marcel", "Ramos", , , "ctb"), + person("Sean", "Davis", , , "ctb"), + person("Martin", "Morgan", , , "ctb") + ) URL: https://github.com/bergant/rapiclient BugReports: https://github.com/bergant/rapiclient/issues Description: Access services specified in OpenAPI (formerly Swagger) format. It is not a code generator. Client is generated dynamically as a list of R functions. Depends: - R (>= 3.3) + R (>= 3.3.0) License: MIT + file LICENSE Imports: jsonlite, httr, yaml -LazyData: TRUE -RoxygenNote: 6.1.1 +Encoding: UTF-8 +RoxygenNote: 7.3.1 Suggests: testthat diff --git a/R/operations.R b/R/operations.R index 283354e..d3fec70 100644 --- a/R/operations.R +++ b/R/operations.R @@ -96,7 +96,7 @@ get_api <- function(url, config = NULL) { #' Operations are parsed from `paths`` element for every path and every action #' inside path. Operation name is set to `operationId` from each action. #' -#' See also specification \url{http://swagger.io/specification/#operationObject} +#' See also specification \url{https://swagger.io/specification/#operationObject} #' #' @param api API object #' @param path (optional) filter by path @@ -123,7 +123,7 @@ get_operation_definitions <- function(api, path = NULL) { # parameters can be defined on path level and overridden on operation # level - # + # # Note that parameters is often a list() rather than NULL, so deal # that situation as well. if(is.null(operation$parameters) || length(operation$parameters)==0) { @@ -480,7 +480,6 @@ build_op_url <- function(api, scheme, host, base_path, op_def, par_values) { #' Extract all parameters from parameters definition as a list #' In case of reference to schema, use the schema. #' @param api API definition -#' @param parameters_def A parameters from API operations definition #' @keywords internal get_parameters <- function(api, api_parameters) { parameters <- get_parameters_definition(api, api_parameters) diff --git a/R/print.R b/R/print.R index 59bbfce..e729538 100644 --- a/R/print.R +++ b/R/print.R @@ -11,7 +11,7 @@ print_wrap <- function(text, ...) { #' Print API object #' #' @param x API object -#' @param ...further arguments passed to or from other methods +#' @param ... further arguments passed to or from other methods #' @export #' @keywords internal print.rapi_api <- function(x, ...) { @@ -34,7 +34,7 @@ print.rapi_api <- function(x, ...) { #' Print Operation #' #' @param x Operation -#' @param ...further arguments passed to or from other methods +#' @param ... further arguments passed to or from other methods #' @export #' @keywords internal print.rapi_operation <- function(x, ...) { @@ -111,7 +111,7 @@ print.rapi_operation <- function(x, ...) { #' Print Operation #' #' @param x Operation -#' @param ...further arguments passed to or from other methods +#' @param ... further arguments passed to or from other methods #' @export #' @keywords internal print.rapi_schema_function <- function(x, ...) { diff --git a/R/rapiclient.R b/R/rapiclient.R index 169c89a..c432ef1 100644 --- a/R/rapiclient.R +++ b/R/rapiclient.R @@ -30,10 +30,9 @@ #' #' Please use \url{https://github.com/bergant/rapiclient/issues} for issues #' -#' @docType package #' @name rapiclient-package #' @aliases rapiclient -NULL +"_PACKAGE" diff --git a/man/get_operation_definitions.Rd b/man/get_operation_definitions.Rd index 41628eb..da300fc 100644 --- a/man/get_operation_definitions.Rd +++ b/man/get_operation_definitions.Rd @@ -18,6 +18,6 @@ Get a list of operations definitions from API specification Operations are parsed from `paths`` element for every path and every action inside path. Operation name is set to `operationId` from each action. -See also specification \url{http://swagger.io/specification/#operationObject} +See also specification \url{https://swagger.io/specification/#operationObject} } \keyword{internal} diff --git a/man/get_operations.Rd b/man/get_operations.Rd index 6f11097..b75e64d 100644 --- a/man/get_operations.Rd +++ b/man/get_operations.Rd @@ -4,8 +4,7 @@ \alias{get_operations} \title{Get operations} \usage{ -get_operations(api, .headers = NULL, path = NULL, - handle_response = identity) +get_operations(api, .headers = NULL, path = NULL, handle_response = identity) } \arguments{ \item{api}{API object (see \code{\link{get_api}})} diff --git a/man/get_parameters.Rd b/man/get_parameters.Rd index 7139e88..67572d6 100644 --- a/man/get_parameters.Rd +++ b/man/get_parameters.Rd @@ -8,8 +8,6 @@ get_parameters(api, api_parameters) } \arguments{ \item{api}{API definition} - -\item{parameters_def}{A parameters from API operations definition} } \description{ Extract all parameters from parameters definition as a list diff --git a/man/get_schema_graphviz_dot.Rd b/man/get_schema_graphviz_dot.Rd index 027e55e..7759443 100644 --- a/man/get_schema_graphviz_dot.Rd +++ b/man/get_schema_graphviz_dot.Rd @@ -4,8 +4,13 @@ \alias{get_schema_graphviz_dot} \title{Get schema graphviz dot (experimental in this version)} \usage{ -get_schema_graphviz_dot(api, schema, schema_name = NULL, - rankdir = "LR", gv_attrs = "") +get_schema_graphviz_dot( + api, + schema, + schema_name = NULL, + rankdir = "LR", + gv_attrs = "" +) } \arguments{ \item{api}{Api object} diff --git a/man/print.rapi_api.Rd b/man/print.rapi_api.Rd index c2e86a3..1d040a3 100644 --- a/man/print.rapi_api.Rd +++ b/man/print.rapi_api.Rd @@ -9,7 +9,7 @@ \arguments{ \item{x}{API object} -\item{...further}{arguments passed to or from other methods} +\item{...}{further arguments passed to or from other methods} } \description{ Print API object diff --git a/man/print.rapi_operation.Rd b/man/print.rapi_operation.Rd index 2989ca3..b35ed77 100644 --- a/man/print.rapi_operation.Rd +++ b/man/print.rapi_operation.Rd @@ -9,7 +9,7 @@ \arguments{ \item{x}{Operation} -\item{...further}{arguments passed to or from other methods} +\item{...}{further arguments passed to or from other methods} } \description{ Print Operation diff --git a/man/print.rapi_schema_function.Rd b/man/print.rapi_schema_function.Rd index a1d37e3..bcc1c81 100644 --- a/man/print.rapi_schema_function.Rd +++ b/man/print.rapi_schema_function.Rd @@ -9,7 +9,7 @@ \arguments{ \item{x}{Operation} -\item{...further}{arguments passed to or from other methods} +\item{...}{further arguments passed to or from other methods} } \description{ Print Operation diff --git a/man/rapiclient-package.Rd b/man/rapiclient-package.Rd index b7035de..32cb308 100644 --- a/man/rapiclient-package.Rd +++ b/man/rapiclient-package.Rd @@ -42,3 +42,22 @@ operations$some_operation(x, y, schemas$some_structure(u, v, ...)) } } +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/bergant/rapiclient} + \item Report bugs at \url{https://github.com/bergant/rapiclient/issues} +} + +} +\author{ +\strong{Maintainer}: Darko Bergant \email{darko.bergant@gmail.com} + +Other contributors: +\itemize{ + \item Marcel Ramos [contributor] + \item Sean Davis [contributor] + \item Martin Morgan [contributor] +} + +} diff --git a/man/result_handlers.Rd b/man/result_handlers.Rd index d728e4c..07e2d1a 100644 --- a/man/result_handlers.Rd +++ b/man/result_handlers.Rd @@ -30,11 +30,11 @@ See \code{\link{get_operations}} for details. } \section{Functions}{ \itemize{ -\item \code{content_or_warning}: Returns content or issues a warning +\item \code{content_or_warning()}: Returns content or issues a warning -\item \code{content_or_message}: Returns content or prints a message -}} +\item \code{content_or_message()}: Returns content or prints a message +}} \examples{ \dontrun{ operations <- get_operations(api, handle_response = content_or_stop)