From 37ae9b1a614e22f6377bb16eb15c4b5ceeac51fd Mon Sep 17 00:00:00 2001 From: Josiah Parry Date: Fri, 1 Dec 2023 14:00:34 -0500 Subject: [PATCH] export update_params()' --- R/arc-select.R | 9 ++++++++- man/update_params.Rd | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/R/arc-select.R b/R/arc-select.R index 42ba3c8..c6bec15 100644 --- a/R/arc-select.R +++ b/R/arc-select.R @@ -283,7 +283,14 @@ check_inherits_any <- function(x, #' #' @param x a `FeatureLayer` or `Table` object #' @param ... key value pairs of query parameters and values. -#' @keywords internal +#' @export +#' @examples +#' if (interactive()) { +#' furl <- "https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Major_Cities_/FeatureServer/0" +#' flayer <- arc_open(furl) +#' update_params(flayer, outFields = "NAME") +#' } +#' @returns An object of the same class as `x` update_params <- function(x, ...) { query <- attr(x, "query") params <- rlang::list2(...) diff --git a/man/update_params.Rd b/man/update_params.Rd index 1595f45..1df247b 100644 --- a/man/update_params.Rd +++ b/man/update_params.Rd @@ -11,7 +11,16 @@ update_params(x, ...) \item{...}{key value pairs of query parameters and values.} } +\value{ +An object of the same class as \code{x} +} \description{ \code{\link[=update_params]{update_params()}} takes named arguments and updates the query. } -\keyword{internal} +\examples{ +if (interactive()) { + furl <- "https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Major_Cities_/FeatureServer/0" + flayer <- arc_open(furl) + update_params(flayer, outFields = "NAME") +} +}