[libgweather/benzea/gnome-3-36-met.no-backport: 3/10] metno: Use compat 2.0 API




commit 12c0cbf22fbeb6b87344ef62ad44bc1232e85c07
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 7 15:14:40 2021 +0100

    metno: Use compat 2.0 API
    
    Version 1.9, which we were using, was deprecated and will be removed soon,
    so migrate to the compat XML output of the v2.0 API.
    
    Closes: #65

 libgweather/weather-yrno.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c
index 7834076f..e6b654c3 100644
--- a/libgweather/weather-yrno.c
+++ b/libgweather/weather-yrno.c
@@ -37,7 +37,7 @@
 
 #define XC(t) ((const xmlChar *)(t))
 
-/* Reference for symbols at http://om.yr.no/forklaring/symbol/ */
+/* Reference for symbols at https://api.met.no/weatherapi/weathericon/2.0/ */
 typedef struct {
     int code;
     GWeatherSky sky;
@@ -444,12 +444,12 @@ yrno_start_open (GWeatherInfo *info)
     if (!loc->latlon_valid)
        return FALSE;
 
-    /* see the description here: https://api.met.no/ */
+    /* see the description here: https://api.met.no/weatherapi/locationforecast/2.0/documentation */
 
     latstr = _radians_to_degrees_str (loc->latitude);
     lonstr = _radians_to_degrees_str (loc->longitude);
 
-    url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/1.9/?lat=%s;lon=%s";, latstr, 
lonstr);
+    url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=%s;lon=%s";, 
latstr, lonstr);
     g_debug ("yrno_start_open, requesting: %s", url);
 
     message = soup_message_new ("GET", url);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]