From 8cf0d77d754cd4a17b53badeeb9335b9b208af99 Mon Sep 17 00:00:00 2001 From: Joan Maspons Date: Wed, 20 Dec 2023 10:54:39 +0100 Subject: [PATCH] Uniformize code patterns --- R/osmapi_elements.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/osmapi_elements.R b/R/osmapi_elements.R index e923bd80..e2c6a86e 100644 --- a/R/osmapi_elements.R +++ b/R/osmapi_elements.R @@ -690,14 +690,14 @@ osm_fetch_objects <- function(osm_type = c("nodes", "ways", "relations"), osm_id } if (format == "json") { - osm_type_endpoint <- paste0(osm_type, ".json") + ext <- paste0(osm_type, ".json") } else { - osm_type_endpoint <- osm_type + ext <- osm_type } req <- osmapi_request() req <- httr2::req_method(req, "GET") - req <- httr2::req_url_path_append(req, osm_type_endpoint) + req <- httr2::req_url_path_append(req, ext) if (osm_type == "nodes") { req <- httr2::req_url_query(req, nodes = paste(osm_ids, collapse = ","))