diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-01-12 14:21:21 +0100 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-03-25 23:07:30 +0100 |
commit | ce09442e245475c833e22dd7fed591c77f770acc (patch) | |
tree | 7d6f8954ff7befc334542f9fdeadd80074eedf30 | |
parent | f6db5b7021876d1403fb97b7d04a30e5aa9a7570 (diff) | |
download | libgweather-ce09442e245475c833e22dd7fed591c77f770acc.tar.gz |
metno: Use GNOME-specific subdomain
This allows the API provider to track libgweather usage.
-rw-r--r-- | libgweather/weather-yrno.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgweather/weather-yrno.c b/libgweather/weather-yrno.c index e6b654c..9b78628 100644 --- a/libgweather/weather-yrno.c +++ b/libgweather/weather-yrno.c @@ -37,6 +37,9 @@ #define XC(t) ((const xmlChar *)(t)) +/* As per https://gitlab.gnome.org/GNOME/libgweather/-/issues/59#note_1004747 */ +#define API_ENDPOINT_DOMAIN "aa037rv1tsaszxi6o.api.met.no" + /* Reference for symbols at https://api.met.no/weatherapi/weathericon/2.0/ */ typedef struct { int code; @@ -449,7 +452,7 @@ yrno_start_open (GWeatherInfo *info) latstr = _radians_to_degrees_str (loc->latitude); lonstr = _radians_to_degrees_str (loc->longitude); - url = g_strdup_printf("https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=%s;lon=%s", latstr, lonstr); + url = g_strdup_printf("https://" API_ENDPOINT_DOMAIN "/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); |