public static async Task <WeatherAccu> GetWeatherInformationAsync(string locationKey) { WeatherAccu result = new WeatherAccu(); string url = string.Format(BASE_URL, locationKey, API_KEY); using (HttpClient client = new HttpClient()) { var response = await client.GetAsync(url); string json = await response.Content.ReadAsStringAsync(); result = JsonConvert.DeserializeObject <WeatherAccu>(json); } return(result); }
public AccuWeatherVM() { Weather = new WeatherAccu(); Cities = new ObservableCollection <AccuCity>(); SelectedResult = new AccuCity(); }