From 57e231a99c4fc969fdeadb956307d3bd87bc7ba7 Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 27 Jan 2025 09:31:54 +0100 Subject: [PATCH] #130 make sure config is explicitely defined as arg. Special arg ... should be limited to WFS vendor params --- R/WFSFeatureType.R | 7 +++++-- man/WFSFeatureType.Rd | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/WFSFeatureType.R b/R/WFSFeatureType.R index e447f54..c613a96 100644 --- a/R/WFSFeatureType.R +++ b/R/WFSFeatureType.R @@ -283,12 +283,15 @@ WFSFeatureType <- R6Class("WFSFeatureType", #'@param parallel whether to get features using parallel multicore strategy. Default is \code{FALSE} #'@param parallel_handler Handler function to parallelize the code. eg \link{mclapply} #'@param cl optional cluster object for parallel cluster approaches using eg. \code{parallel::makeCluster} + #'@param config an additional config from \pkg{httr} package #'@return features as object of class \code{sf} getFeatures = function(..., validate = TRUE, outputFormat = NULL, paging = FALSE, paging_length = 1000, - parallel = FALSE, parallel_handler = NULL, cl = NULL){ + parallel = FALSE, parallel_handler = NULL, cl = NULL, + config = httr::config() + ){ #getdescription if(is.null(self$description)){ @@ -350,7 +353,7 @@ WFSFeatureType <- R6Class("WFSFeatureType", WFSGetFeature$new, c( capabilities = private$capabilities, op = op, url = private$url, version = private$version, typeName = private$name, outputFormat = outputFormat, - user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), + user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), config = config, logger = self$loggerType, vendorParams ) diff --git a/man/WFSFeatureType.Rd b/man/WFSFeatureType.Rd index ddaf99f..5eba177 100644 --- a/man/WFSFeatureType.Rd +++ b/man/WFSFeatureType.Rd @@ -273,7 +273,8 @@ Get features paging_length = 1000, parallel = FALSE, parallel_handler = NULL, - cl = NULL + cl = NULL, + config = httr::config() )}\if{html}{\out{}} } @@ -296,6 +297,8 @@ Get features \item{\code{cl}}{optional cluster object for parallel cluster approaches using eg. \code{parallel::makeCluster}} +\item{\code{config}}{an additional config from \pkg{httr} package} + \item{\code{typeName}}{the name of the feature type} } \if{html}{\out{}}