[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 01/01: Switch to 'locationforecast' product and use a more recent API version (bug #16268)
noreply at xfce.org
noreply at xfce.org
Fri Jan 24 09:29:50 CET 2020
This is an automated email from the git hooks/post-receive script.
l a n d r y p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-weather-plugin.
commit abd77251273d0cfaac29c883217dcfdb5b257830
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date: Sun Dec 22 19:29:58 2019 +0100
Switch to 'locationforecast' product and use a more recent API version (bug #16268)
---
panel-plugin/weather.c | 8 +++++---
panel-plugin/weather.h | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index be745b3..7d79566 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -588,6 +588,7 @@ cb_weather_update(SoupSession *session,
static gboolean
update_handler(plugin_data *data)
{
+ gchar *api_version = FORECAST_API;
gchar *url;
gboolean night_time;
time_t now_t;
@@ -653,9 +654,10 @@ update_handler(plugin_data *data)
data->weather_update->started = TRUE;
/* build url */
- url = g_strdup_printf("https://api.met.no/weatherapi"
- "/locationforecastlts/1.3/?lat=%s&lon=%s&"
- "msl=%d",
+ url = g_strdup_printf("https://api.met.no"
+ "/weatherapi/locationforecast/%s/"
+ "?lat=%s&lon=%s&msl=%d",
+ api_version,
data->lat, data->lon, data->msl);
/* start receive thread */
diff --git a/panel-plugin/weather.h b/panel-plugin/weather.h
index 86629c7..2723fc4 100644
--- a/panel-plugin/weather.h
+++ b/panel-plugin/weather.h
@@ -31,6 +31,7 @@
#define MAX_FORECAST_DAYS 10
#define DEFAULT_FORECAST_DAYS 5
#define MAX_SCROLLBOX_LINES 10
+#define FORECAST_API "1.9"
G_BEGIN_DECLS
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list