Merge pull request #1046 from manuelwinz/patch-1

OpenWeatherMap One Call API 3.0
This commit is contained in:
Florian BEZANNIER
2025-04-09 18:10:06 +02:00
committed by GitHub
+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,