summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-01-07 15:14:40 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-12 01:15:11 +0100
commit2c187a74c575d7c32535ff1db2206cbf7a045ffb (patch)
tree4b3e625b3d284daaff80fbae4942576791ac8541
parenta8457daec84ad77a85cbc843c768d2b55bb583c4 (diff)
downloadlibgweather-wip/hadess/met-no-migration.tar.gz
metno: Use compat 2.0 APIwip/hadess/met-no-migration
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgweather/weather-metno.c b/libgweather/weather-metno.c
index 81b1446..eaa48b1 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);