diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-01-07 15:14:40 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-01-12 10:05:43 +0100 |
commit | c0c39a54b67849efe17367fa9b6f1ca7ad58349b (patch) | |
tree | fe518745da26ac2bbc7e527c4da7b1154777f86f | |
parent | 6414276d5e4cda54110ff436ce7071ccef7cc962 (diff) | |
download | libgweather-c0c39a54b67849efe17367fa9b6f1ca7ad58349b.tar.gz |
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
-rw-r--r-- | libgweather/weather-metno.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgweather/weather-metno.c b/libgweather/weather-metno.c index 2ac1562..594fd23 100644 --- a/libgweather/weather-metno.c +++ b/libgweather/weather-metno.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 @@ metno_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 ("metno_start_open, requesting: %s", url); message = soup_message_new ("GET", url); |