Skip to content

Commit

Permalink
update readme and comments from bing to azure
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpearson committed May 23, 2024
1 parent c53df38 commit 990e03b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ criteria (7 day hourly forecast, reasonably priced or free)
- add your own key for Visualcrossing, if desired
- server config for ad-hoc forecasts:
- Set the port the server should listen on (set to `0` to disable the server)
- Insert your own [Bing Maps Location API token][bing-token]
- Insert your own [Azure Maps Shared Key][azure-key] (requires Azure Maps account. There is a free tier.)

### Ad-hoc Forecasts Setup

Expand Down Expand Up @@ -124,5 +124,5 @@ large amounts for my personal forecast dashboard is just silly.
[release]: https://github.com/tedpearson/ForecastMetrics/releases
[config-example]: https://github.com/tedpearson/ForecastMetrics/blob/master/config/forecastmetrics.example.yaml
[install-go]: https://golang.org/dl/
[bing-token]: https://learn.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-maps-key
[azure-key]: https://learn.microsoft.com/en-us/azure/azure-maps/azure-maps-authentication
[ambientweatherexporter]: https://github.com/tedpearson/ambientweatherexporter
2 changes: 1 addition & 1 deletion forecastmetrics.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http_cache_dir: /var/lib/forecastmetrics/cache
# instead of a new series each time. This works
# with influxdb but not with VictoriaMetrics.
overwrite_data: false
# Bing Maps Location API token to provide location lookup for adhoc forecasts, if enabled
# Azure Maps Shared Key to provide location lookup for adhoc forecasts, if enabled
azure_shared_key: your_token_here
server:
# port to run http server on for adhoc forecasts
Expand Down
4 changes: 2 additions & 2 deletions location.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

var latLonRe = regexp.MustCompile(`(\d+\.\d+),\s*(\d+\.\d+)`)

// LocationService parses strings into Location, using the Bing Maps Locations API.
// LocationService parses strings into Location, using the Azure Maps Get Geocoding API.
type LocationService struct {
AzureSharedKey string
}
Expand Down Expand Up @@ -52,7 +52,7 @@ func (l LocationService) ParseLocation(s string) (*Location, error) {
}

// lookup fills out the location argument with information looked up from
// the Bing Maps Locations API. The Name field on Location will only be populated
// the Azure Maps Get Geocoding API. The Name field on Location will only be populated
// if it is an empty string.
func (l LocationService) lookup(s string, location *Location) error {
q := url.Values{}
Expand Down

0 comments on commit 990e03b

Please sign in to comment.