@@ -51,18 +51,32 @@ void WundergroundClient::updateConditions(String apiKey, String language, String
5151 doUpdate (" /api/" + apiKey + " /conditions/lang:" + language + " /q/zmw:" + zmwCode + " .json" );
5252}
5353
54+ void WundergroundClient::updateConditionsPWS (String apiKey, String language, String pws) {
55+ isForecast = false ;
56+ doUpdate (" /api/" + apiKey + " /conditions/lang:" + language + " /q/pws:" + pws + " .json" );
57+ }
58+
5459void WundergroundClient::updateForecast (String apiKey, String language, String country, String city) {
5560 isForecast = true ;
5661 doUpdate (" /api/" + apiKey + " /forecast10day/lang:" + language + " /q/" + country + " /" + city + " .json" );
5762}
5863
64+ void WundergroundClient::updateForecastPWS (String apiKey, String language, String pws) {
65+ isForecast = true ;
66+ doUpdate (" /api/" + apiKey + " /forecast10day/lang:" + language + " /q/pws:" + pws + " .json" );
67+ }
68+
5969// JJG added ////////////////////////////////
6070void WundergroundClient::updateAstronomy (String apiKey, String language, String country, String city) {
6171 isForecast = true ;
6272 doUpdate (" /api/" + apiKey + " /astronomy/lang:" + language + " /q/" + country + " /" + city + " .json" );
6373}
6474// end JJG add ////////////////////////////////////////////////////////////////////
6575
76+ void WundergroundClient::updateAstronomyPWS (String apiKey, String language, String pws) {
77+ isForecast = true ;
78+ doUpdate (" /api/" + apiKey + " /astronomy/lang:" + language + " /q/pws:" + pws + " .json" );
79+ }
6680// fowlerk added
6781void WundergroundClient::updateAlerts (String apiKey, String language, String country, String city) {
6882 currentAlert = 0 ;
@@ -82,6 +96,23 @@ void WundergroundClient::updateAlerts(String apiKey, String language, String cou
8296}
8397// end fowlerk add
8498
99+ void WundergroundClient::updateAlertsPWS (String apiKey, String language, String country, String pws) {
100+ currentAlert = 0 ;
101+ activeAlertsCnt = 0 ;
102+ isForecast = false ;
103+ isSimpleForecast = false ;
104+ isCurrentObservation = false ;
105+ isAlerts = true ;
106+ if (country == " US" ) {
107+ isAlertUS = true ;
108+ isAlertEU = false ;
109+ } else {
110+ isAlertUS = false ;
111+ isAlertEU = true ;
112+ }
113+ doUpdate (" /api/" + apiKey + " /alerts/lang:" + language + " /q/pws:" + pws + " .json" );
114+ }
115+
85116void WundergroundClient::doUpdate (String url) {
86117 JsonStreamingParser parser;
87118 parser.setListener (this );
0 commit comments