Skip to content

Commit 7d8372f

Browse files
committed
Don't allow no_paging for metadata type retrievals.
1 parent 4d4f2fb commit 7d8372f

File tree

4 files changed

+11
-20
lines changed

4 files changed

+11
-20
lines changed

R/get_ogc_data.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ get_ogc_data <- function(args,
2828
args[["max_results"]] <- NULL
2929

3030
req <- do.call(construct_api_requests, args)
31-
32-
no_paging <- args[["no_paging"]]
33-
args[["no_paging"]] <- NULL
31+
32+
if("no_paging" %in% names(args)){
33+
no_paging <- args[["no_paging"]]
34+
args[["no_paging"]] <- NULL
35+
} else {
36+
no_paging <- FALSE
37+
}
3438

3539
if(no_paging){
3640
return_list <- get_csv(req, max_results)

R/read_waterdata_monitoring_location.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363
#' @param skipGeometry This option can be used to skip response geometries for
6464
#' each feature. The returning object will be a data frame with no spatial
6565
#' information.
66-
#' @param no_paging logical, defaults to `FALSE`. If `TRUE`, the data will
67-
#' be requested from a native csv format. This can be dangerous because the
68-
#' data will cut off at 50,000 rows without indication that more data
69-
#' is available. Use `TRUE` with caution.
7066
#' @examplesIf is_dataRetrieval_user()
7167
#'
7268
#' \donttest{
@@ -140,8 +136,7 @@ read_waterdata_monitoring_location <- function(monitoring_location_id = NA_chara
140136
bbox = NA,
141137
limit = NA,
142138
max_results = NA,
143-
skipGeometry = NA,
144-
no_paging = FALSE){
139+
skipGeometry = NA){
145140

146141
service <- "monitoring-locations"
147142
output_id <- "monitoring_location_id"

R/read_waterdata_parameter_codes.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ read_waterdata_parameter_codes <- function(parameter_code = NA_character_,
6767
args[["convertType"]] <- FALSE
6868
args[["skipGeometry"]] <- TRUE
6969
args[["bbox"]] <- NA
70-
args[["no_paging"]] <- TRUE # change if we're ever over 50,000
70+
args[["no_paging"]] <- FALSE # change if we're ever over 50,000
7171

7272
if(all(lengths(args) == 1)){
7373
return_list <- suppressWarnings(get_ogc_data(args = args,
@@ -76,9 +76,7 @@ read_waterdata_parameter_codes <- function(parameter_code = NA_character_,
7676
} else {
7777

7878
message("Current API functionality requires pulling the full parameter-codes list.
79-
It is expected that updates to the API will eliminate this need, but in the meantime
80-
consider running read_waterdata_parameter_code() with no query parameters, and filtering
81-
in a post-processing step.")
79+
It is expected that updates to the API will eliminate this need.")
8280

8381
return_list <- read_waterdata_metadata(collection = service,
8482
max_results = max_results,

man/read_waterdata_monitoring_location.Rd

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)