Skip to content

Commit

Permalink
Uniformize code patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaspons committed Dec 20, 2023
1 parent 5adb568 commit 8cf0d77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/osmapi_elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ","))
Expand Down

0 comments on commit 8cf0d77

Please sign in to comment.