Exemple #1
0
        public async Task <WeatherModel> GetCurrentByCityName(string cityName)
        {
            var data = await _weatherClient.GetCurrentByCityName(cityName, _configuration.ApiVersion, _configuration.AppId);

            return(new WeatherModel
            {
                Name = data.Name,
                Temperature = data.Main?.Temp ?? 0
            });
        }
 public Task <WeatherData> GetCurrentByCityName(string cityName, string version, string appId)
 {
     return(_internalClient.GetCurrentByCityName(cityName, version, appId));
 }