Package: xfce4-weather-plugin / 0.8.3-3

0004-Update-URL-for-sunrise-API-to-point-to-version-1.1-b.patch Patch series | download
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
From ff1d6c82f19eb75d793f4657ad3090ee7f80ce62 Mon Sep 17 00:00:00 2001
From: Harald Judt <h.judt@gmx.at>
Date: Wed, 20 Apr 2016 09:29:01 +0200
Subject: [PATCH 4/7] Update URL for sunrise API to point to version 1.1 (bug
 #12333)

This is only a small part of the patch uploaded by ToZ. It restores
functionality of the current version while not introducing any new
translation strings. Additionally, this commits updates the link
in the README.
---
 README                         | 2 +-
 panel-plugin/weather-parsers.c | 2 +-
 panel-plugin/weather.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 5f4ce5d..439b65b 100644
--- a/README
+++ b/README
@@ -84,7 +84,7 @@ left open by the former:
 
 * Service-specific documentation
   http://api.met.no/weatherapi/locationforecastlts/1.2/documentation
-  http://api.yr.no/weatherapi/sunrise/1.0/documentation
+  http://api.yr.no/weatherapi/sunrise/1.1/documentation
 
 For more technical details you might need to study the XML schema
 corresponding to the document in question.
diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 2c90c11..a1ad381 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.0/schema for information
+ * Look at http://api.yr.no/weatherapi/sunrise/1.1/schema for information
  * of elements and attributes to expect.
  */
 xml_astro *
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 5271cd5..4fa9fc4 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.0/?"
+        url = g_strdup_printf("http://api.yr.no/weatherapi/sunrise/1.1/?"
                               "lat=%s;lon=%s;date=%04d-%02d-%02d",
                               data->lat, data->lon,
                               now_tm.tm_year + 1900,
-- 
2.11.0