From 706cf350d762ff8b1d0fc8e13a41a52d5432e321 Mon Sep 17 00:00:00 2001 From: Rob Prouse Date: Tue, 29 Oct 2024 12:54:37 -0400 Subject: [PATCH] Update to the v3.0 weather API --- Guppi.Console/Guppi.Console.csproj | 2 +- Guppi.Console/Properties/launchSettings.json | 2 +- Guppi.Core/Services/WeatherService.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Guppi.Console/Guppi.Console.csproj b/Guppi.Console/Guppi.Console.csproj index 8c65058..eec8db8 100644 --- a/Guppi.Console/Guppi.Console.csproj +++ b/Guppi.Console/Guppi.Console.csproj @@ -13,7 +13,7 @@ https://github.com/rprouse/guppi https://github.com/rprouse/guppi dotnet-guppi - 6.3.2 + 6.3.3 true guppi ./nupkg diff --git a/Guppi.Console/Properties/launchSettings.json b/Guppi.Console/Properties/launchSettings.json index c324b70..c6eccea 100644 --- a/Guppi.Console/Properties/launchSettings.json +++ b/Guppi.Console/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Guppi.Console": { "commandName": "Project", - "commandLineArgs": "todo sync" + "commandLineArgs": "weather daily" } } } diff --git a/Guppi.Core/Services/WeatherService.cs b/Guppi.Core/Services/WeatherService.cs index a5bf47e..cb7c3f1 100644 --- a/Guppi.Core/Services/WeatherService.cs +++ b/Guppi.Core/Services/WeatherService.cs @@ -36,7 +36,7 @@ public async Task GetWeather(string latitude, string longitude) throw new UnconfiguredException("Please configure the weather provider"); } - var weather = await _restService.GetData($"https://api.openweathermap.org/data/2.5/onecall?lat={latitude}&lon={longitude}&appid={_configuration.ApiKey}"); + var weather = await _restService.GetData($"https://api.openweathermap.org/data/3.0/onecall?lat={latitude}&lon={longitude}&appid={_configuration.ApiKey}"); return weather.GetWeather(); }