OpenWeatherMap One Call API 3.0

Since the OpenWeatherMap One Call API 2.5 is deprecated since June 2024, its time to use the 3.0 version.
This commit is contained in:
Manuel Winz
2025-02-24 12:16:47 +01:00
committed by GitHub
parent 0bbd8a1828
commit 99ea3f4a91
+1 -1
View File
@@ -10,7 +10,7 @@ TIMEOUT_IN_S = 10
def get_temp(latitude: str, longitude: str, api_key: str) -> float:
try:
if latitude and longitude and api_key:
weather_rep = requests.get("https://api.openweathermap.org/data/2.5/onecall",
weather_rep = requests.get("https://api.openweathermap.org/data/3.0/onecall",
params={"lat": latitude, "lon": longitude,
"exclude": "minutely,hourly,daily,alerts",
"appid": api_key,