Skip to content

Commit 8c88d62

Browse files
committed
Fix after API change
1 parent fe4f7bf commit 8c88d62

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

examples/OpenWeatherMapCurrentDemo/OpenWeatherMapCurrentDemo.ino

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ OpenWeatherMapCurrent client;
3636

3737
String OPEN_WEATHER_MAP_APP_ID = "XXX";
3838
String OPEN_WEATHER_MAP_LOCATION = "Zurich,CH";
39+
/*
40+
Arabic - ar, Bulgarian - bg, Catalan - ca, Czech - cz, German - de, Greek - el,
41+
English - en, Persian (Farsi) - fa, Finnish - fi, French - fr, Galician - gl,
42+
Croatian - hr, Hungarian - hu, Italian - it, Japanese - ja, Korean - kr,
43+
Latvian - la, Lithuanian - lt, Macedonian - mk, Dutch - nl, Polish - pl,
44+
Portuguese - pt, Romanian - ro, Russian - ru, Swedish - se, Slovak - sk,
45+
Slovenian - sl, Spanish - es, Turkish - tr, Ukrainian - ua, Vietnamese - vi,
46+
Chinese Simplified - zh_cn, Chinese Traditional - zh_tw.
47+
*/
48+
String OPEN_WEATHER_MAP_LANGUAGE = "en";
3949
boolean IS_METRIC = true;
4050

4151
/**
@@ -80,7 +90,9 @@ void setup() {
8090
Serial.println("\n\nNext Loop-Step: " + String(millis()) + ":");
8191

8292
OpenWeatherMapCurrentData data;
83-
client.updateCurrent(&data, OPEN_WEATHER_MAP_APP_ID, OPEN_WEATHER_MAP_LOCATION, IS_METRIC);
93+
client.setLanguage(OPEN_WEATHER_MAP_LANGUAGE);
94+
client.setMetric(IS_METRIC);
95+
client.updateCurrent(&data, OPEN_WEATHER_MAP_APP_ID, OPEN_WEATHER_MAP_LOCATION);
8496

8597
Serial.println("------------------------------------");
8698

examples/OpenWeatherMapForecastDemo/OpenWeatherMapForecastDemo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Portuguese - pt, Romanian - ro, Russian - ru, Swedish - se, Slovak - sk,
4545
Slovenian - sl, Spanish - es, Turkish - tr, Ukrainian - ua, Vietnamese - vi,
4646
Chinese Simplified - zh_cn, Chinese Traditional - zh_tw.
4747
*/
48-
String OPEN_WEATHER_MAP_LANGUAGE = "de";
48+
String OPEN_WEATHER_MAP_LANGUAGE = "en";
4949
boolean IS_METRIC = false;
5050
uint8_t MAX_FORECASTS = 15;
5151

0 commit comments

Comments
 (0)