private async void GetWeather() { var weather = await WeatherAPI.GetWeatherInformationAsync(SelectedCity.Key); Weather.WeatherText = weather[0].WeatherText; Weather.Precipitation = weather[0].Precipitation; Weather.RealFeelTemperature = weather[0].RealFeelTemperature; Weather.Temperature = weather[0].Temperature; Weather.CityName = selectedCity.LocalizedName; }
private async void GetCities() { //AutoComplete API requests are limited to 25 per day var cities = await WeatherAPI.GetAutocompleteAsync(Query); Cities.Clear(); foreach (var city in cities) { Cities.Add(city); } }
private async void GetCities() { var cities = await WeatherAPI.GetAutoCompleteAsync(Query); Cities.Clear(); foreach (var city in cities) { Cities.Add(city); } }
public async void GetWeather() { var weather = await WeatherAPI.GetWeatherInformationAsync(SelectedCity.Key); if (weather.DailyForecasts != null) { Forecasts.Clear(); foreach (var forcast in weather.DailyForecasts) { Forecasts.Add(forcast); } } }