/// <summary> /// Get current weather by city or zipcode based on isCity true or false /// </summary> /// <param name="inputValue"></param> /// <param name="isCity"></param> /// <returns></returns> public WeatherEntity GetCurrentWeather(string inputValue, bool isCity) { try { var parser = new WeatherParserResponse(); var response = new Client.Current.CurrentWeather(); response = isCity ? apiClient.GetCurrentWeatherByCity(inputValue) : apiClient.GetCurrentWeatherByZipCode(inputValue); var weather = parser.GetWeatherData(response, inputValue, isCity); return(weather); } catch (Exception) { throw; } }