public void GetConditionsAndForecastForLocationAsync() { //Get the weather forecast for the specified location WeatherResponse forecast = WUndergroundClient.GetConditionsAndForecastForLocationAsync(51.4800, 0.0).Result; var v = forecast.forecast.txt_forecast.forecastday[0].fcttext; //Debug.WriteLine(forecast.forecast.txt_forecast.forecastday[0].fcttext); }
public void GetConditionsForLocationAsync() { //Get the current weather conditions for the specified location WeatherResponse current = WUndergroundClient.GetConditionsForLocationAsync(51.4800, 0.0).Result; Assert.AreNotEqual(current.current_observation.feelslike_string.Length, 0); }
static void Main(string[] args) { //Configure the client by setting the API Key. Get yours at http://www.wunderground.com WUnderground.Client.WUndergroundClient.Config.ApiKey = ConfigurationSettings.AppSettings["ApiKey"]; //Get the current weather conditions for the specified location WeatherResponse current = WUndergroundClient.GetConditionsForLocationAsync(51.4800, 0.0).Result; Debug.WriteLine(current.current_observation.feelslike_string); //Get the weather forecast for the specified location WeatherResponse forecast = WUndergroundClient.GetConditionsAndForecastForLocationAsync(51.4800, 0.0).Result; Debug.WriteLine(forecast.forecast.txt_forecast.forecastday[0].fcttext); }
static void Main(string[] args) { //Configure the client by setting the API Key. Get yours at http://www.wunderground.com WUndergroundClient.Config.ApiKey = Properties.Settings.Default.ApiKey; WUndergroundClient.Config.PROXY_HOST = Properties.Settings.Default.ProxyHost; WUndergroundClient.Config.PROXY_PASS = Properties.Settings.Default.ProxyPassword; WUndergroundClient.Config.PROXY_USER = Properties.Settings.Default.ProxyUsername; //Get the current weather conditions for the specified location WeatherResponse current = WUndergroundClient.GetConditionsForLocationAsync(51.4800, 0.0).Result; Debug.WriteLine(current.current_observation.feelslike_string); //Get the weather forecast for the specified location WeatherResponse forecast = WUndergroundClient.GetConditionsAndForecastForLocationAsync(51.4800, 0.0).Result; Debug.WriteLine(forecast.forecast.txt_forecast.forecastday[0].fcttext); //Get the weather forecast for the specified location Observation observation = WUndergroundClient.GetHistoricObservationForLocationAsync(new System.DateTime(2015, 12, 01, 12, 10, 10), 51.4800, 0.0).Result; Debug.WriteLine(observation.conds); }
public void GetConditionsForCityAsync() { WeatherResponse current_city = WUndergroundClient.GetConditionsForCityAsync("Utrecht", "NL").Result; Assert.AreEqual(current_city.current_observation.display_location.full, "Utrecht, Netherlands"); }
public void GetConditionsForPwsIdAsync() { WeatherResponse current_city = WUndergroundClient.GetConditionsForPersonalWeatherStationAsync("IKOUDEKE10").Result; Assert.AreEqual("Vlissingen, Netherlands", current_city.current_observation.display_location.full); }