From 1f6ebb3eac1e9daba06c5f2e628c98d8ce0438af Mon Sep 17 00:00:00 2001 From: Mans Magnusson Date: Sat, 13 Jan 2024 16:55:30 +0100 Subject: [PATCH] Fixes issue 268 --- R/pxweb_add_config.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/R/pxweb_add_config.R b/R/pxweb_add_config.R index f62020b1..9956dae6 100644 --- a/R/pxweb_add_config.R +++ b/R/pxweb_add_config.R @@ -46,10 +46,16 @@ pxweb_add_config <- function(obj) { } cfg <- httr::content(r, "parsed") + if(!is.null(cfg$maxCells)){ + mvtd <- cfg$maxCells + } else { + mvtd <- cfg$maxValues + } + obj$config <- list( calls_per_period = cfg$maxCalls, period_in_seconds = cfg$timeWindow, - max_values_to_download = cfg$maxValues, + max_values_to_download = mvtd, CORS = cfg$CORS )