Skip to content

Commit

Permalink
Make new parameter 'clustersST' API compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
boitardn committed Jun 11, 2024
1 parent a35d983 commit facff5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/utils_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ read_secure_json <- function(url, token = NULL, timeout = 60, config = list()) {
)

areasWithResClusters <- names(hasResClusters)[hasResClusters]

hasSTClusters <- unlist(
lapply(
read_secure_json(file.path(dataPath, "areas&depth=2"), ...),
function(x) any(grepl("details-STstorage-", names(x)))
)
)

areasWithSTClusters <- names(hasSTClusters)[hasSTClusters]
# Available variables
variables <- list()

Expand Down Expand Up @@ -212,6 +221,7 @@ read_secure_json <- function(url, token = NULL, timeout = 60, config = list()) {
linksDef = linksDef,
areasWithClusters = intersect(areasWithClusters, areaList),
areasWithResClusters = intersect(areasWithResClusters, areaList),
areasWithSTClusters = intersect(areasWithSTClusters, areaList),
variables = variables,
parameters = params
)
Expand Down

0 comments on commit facff5f

Please sign in to comment.