1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
From 6e7f1a4cf406e78561df08c5cc375bdb311d0af5 Mon Sep 17 00:00:00 2001
From: Harald Judt <h.judt@gmx.at>
Date: Wed, 31 Aug 2016 21:43:16 +0200
Subject: [PATCH 5/7] Update http://api.yr.no URLs to https://api.met.no
https://www.slightfuture.com/devel/met-norway-api-endpoints
Let's use the https protocol too, since libsoup supports it.
This should improve security and privacy.
---
panel-plugin/weather-parsers.c | 2 +-
panel-plugin/weather-translate.c | 2 +-
panel-plugin/weather.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index a1ad381..02e141c 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -406,7 +406,7 @@ parse_astro_location(xmlNode *cur_node,
/*
- * Look at http://api.yr.no/weatherapi/sunrise/1.1/schema for information
+ * Look at https://api.met.no/weatherapi/sunrise/1.1/schema for information
* of elements and attributes to expect.
*/
xml_astro *
diff --git a/panel-plugin/weather-translate.c b/panel-plugin/weather-translate.c
index cc97600..a26a9d1 100644
--- a/panel-plugin/weather-translate.c
+++ b/panel-plugin/weather-translate.c
@@ -191,7 +191,7 @@ static const symbol_desc symbol_to_desc[] = {
* try to match these with existing symbols, in order to be compatible
* with existing icon themes and to maintain translation completeness.
*
- * See http://api.met.no/weatherapi/weathericon/1.1/documentation
+ * See https://api.met.no/weatherapi/weathericon/1.1/documentation
* for a list of symbols. For a list of symbols with descriptions,
* see http://om.yr.no/forklaring/symbol.
*/
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 4fa9fc4..b660fc7 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -616,7 +616,7 @@ update_handler(plugin_data *data)
data->astro_update->next = time_calc_hour(now_tm, 1);
/* build url */
- url = g_strdup_printf("http://api.yr.no/weatherapi/sunrise/1.1/?"
+ url = g_strdup_printf("https://api.met.no/weatherapi/sunrise/1.1/?"
"lat=%s;lon=%s;date=%04d-%02d-%02d",
data->lat, data->lon,
now_tm.tm_year + 1900,
@@ -637,7 +637,7 @@ update_handler(plugin_data *data)
/* build url */
url =
- g_strdup_printf("http://api.yr.no/weatherapi"
+ g_strdup_printf("https://api.met.no/weatherapi"
"/locationforecastlts/1.2/?lat=%s;lon=%s;msl=%d",
data->lat, data->lon, data->msl);
--
2.11.0
|