Blame SOURCES/0003-metno-Use-compat-2.0-API.patch

96fe25
From 3df75414d865829274ddc64d30ada98ca08fba3b Mon Sep 17 00:00:00 2001
96fe25
From: Bastien Nocera <hadess@hadess.net>
96fe25
Date: Thu, 7 Jan 2021 15:14:40 +0100
96fe25
Subject: [PATCH 3/7] metno: Use compat 2.0 API
96fe25
96fe25
Version 1.9, which we were using, was deprecated and will be removed soon,
96fe25
so migrate to the compat XML output of the v2.0 API.
96fe25
96fe25
Closes: #65
96fe25
---
96fe25
 libgweather/weather-yrno.c | 6 +++---
96fe25
 1 file changed, 3 insertions(+), 3 deletions(-)
96fe25
96fe25
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
96fe25
index d01075bf..7a46fbae 100644
96fe25
--- a/libgweather/weather-yrno.c
96fe25
+++ b/libgweather/weather-yrno.c
96fe25
@@ -37,7 +37,7 @@
96fe25
 
96fe25
 #define XC(t) ((const xmlChar *)(t))
96fe25
 
96fe25
-/* Reference for symbols at http://om.yr.no/forklaring/symbol/ */
96fe25
+/* Reference for symbols at https://api.met.no/weatherapi/weathericon/2.0/ */
96fe25
 typedef struct {
96fe25
     int code;
96fe25
     GWeatherSky sky;
96fe25
@@ -589,12 +589,12 @@ yrno_start_open_new (GWeatherInfo *info)
96fe25
     if (!loc->latlon_valid)
96fe25
 	return FALSE;
96fe25
 
96fe25
-    /* see the description here: https://api.met.no/ */
96fe25
+    /* see the description here: https://api.met.no/weatherapi/locationforecast/2.0/documentation */
96fe25
 
96fe25
     g_ascii_dtostr (latstr, sizeof(latstr), RADIANS_TO_DEGREES (loc->latitude));
96fe25
     g_ascii_dtostr (lonstr, sizeof(lonstr), RADIANS_TO_DEGREES (loc->longitude));
96fe25
 
96fe25
-    url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/1.9/?lat=%s;lon=%s", latstr, lonstr);
96fe25
+    url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=%s;lon=%s", latstr, lonstr);
96fe25
 
96fe25
     message = soup_message_new ("GET", url);
96fe25
     _gweather_info_begin_request (info, message);
96fe25
-- 
96fe25
2.30.2
96fe25