Skip to content

Commit

Permalink
geo-services back end url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffswitzer committed Jan 23, 2024
1 parent 73cc95c commit 48a80a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions R/npn_geoserver.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ npn_get_custom_agdd_time_series <- function(
method <- tolower(method)

if(method == "simple"){
base_url <- paste0(base_data_domain(), "geoservices/v1/agdd/simple/pointTimeSeries?")
base_url <- paste0(base_data_domain(), "geo-services/v1/agdd/simple/pointTimeSeries?")
}else{
base_url <- paste0(base_data_domain(), "geoservices/v1/agdd/double-sine/pointTimeSeries?")
base_url <- paste0(base_data_domain(), "geo-services/v1/agdd/double-sine/pointTimeSeries?")
}

url <- paste0(base_url, "climateProvider=", climate_data_source)
Expand Down Expand Up @@ -541,9 +541,9 @@ npn_get_custom_agdd_raster <- function(
ras <- NULL

if(method == "simple"){
base_url <- paste0(base_data_domain(),"geoservices/v1/agdd/simple/map?")
base_url <- paste0(base_data_domain(),"geo-services/v1/agdd/simple/map?")
}else{
base_url <- paste0(base_data_domain(),"geoservices/v1/agdd/double-sine/map?")
base_url <- paste0(base_data_domain(),"geo-services/v1/agdd/double-sine/map?")
}


Expand Down
4 changes: 2 additions & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ base_data_domain <- function(){
}

if(pkg.env$remote_env=="ops"){
return('https://data.usanpn.org/')
return('https://services.usanpn.org/')
}else{
return('https://data-dev.usanpn.org/')
return('https://services-staging.usanpn.org/')
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/npn_get_custom_agdd_time_series_1.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
http_interactions:
- request:
method: get
uri: https://data-dev.usanpn.org/geoservices/v1/agdd/double-sine/pointTimeSeries?climateProvider=NCEP&temperatureUnit=fahrenheit&startDate=2019-01-01&endDate=2019-01-15&latitude=39.7&longitude=-107.5&lowerThreshold=25&upperThreshold=90
uri: https://services.usanpn.org/geo-services/v1/agdd/double-sine/pointTimeSeries?climateProvider=NCEP&temperatureUnit=fahrenheit&startDate=2019-01-01&endDate=2019-01-15&latitude=39.7&longitude=-107.5&lowerThreshold=25&upperThreshold=90
body:
encoding: ''
string: ''
Expand Down

0 comments on commit 48a80a5

Please sign in to comment.