Skip to content

Commit

Permalink
adding count=no to legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
ldecicco-USGS committed Nov 5, 2024
1 parent 6bfc32a commit d289745
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions R/constructNWISURL.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ constructWQPURL <- function(siteNumbers,
siteNumbers <- paste(siteNumbers, collapse = ";")
baseURL <- httr2::req_url_query(baseURL,
siteid = siteNumbers)
baseURL <- httr2::req_url_query(baseURL,
count = "no")
} else {
baseURL <- httr2::request(pkg.env[["ResultWQX3"]])
baseURL <- httr2::req_url_query(baseURL,
Expand Down
2 changes: 1 addition & 1 deletion R/getWebServiceData.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ getWebServiceData <- function(obs_url, ...) {
obs_url <- httr2::req_headers(obs_url,
`Accept-Encoding` = c("compress", "gzip"))

print(obs_url) #when happy with httr2, maybe only print url
message("GET:", obs_url$url)
returnedList <- httr2::req_perform(obs_url)

good <- check_non_200s(returnedList)
Expand Down
4 changes: 4 additions & 0 deletions R/readWQPdots.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ readWQPdots <- function(..., legacy = TRUE) {
values["mimeType"] <- "csv"
}

if(legacy & !("count" %in% names(values))){
values["count"] <- "no"
}

return_list <- list()
return_list["values"] <- list(values)
return_list["service"] <- service
Expand Down

0 comments on commit d289745

Please sign in to comment.