Esempio n. 1
0
        public WindModel GetWeatherWind(string cityName = "Kazan")
        {
            WeatherClient client       = new WeatherClient(m_accessKey);
            var           resourceData = client.GetCurrentWeatherSourceDataAsync <OpenWeatherMapModel>(cityName, "en").Result;
            var           resultData   = client.GetCurrentWindResultDataAsync(_logger, cityName, resourceData);

            return(resultData.Result);
        }
Esempio n. 2
0
        public WeatherModel GetWeatherTemperature(string cityName = "Kazan", string metric = "celsius")
        {
            WeatherClient client       = new WeatherClient(m_accessKey);
            var           resourceData = client.GetCurrentWeatherSourceDataAsync <OpenWeatherMapModel>(cityName, "en").Result;
            var           resultData   = client.GetCurrentWeatherResultDataAsync(_logger, cityName, metric, resourceData);

            return(resultData.Result);
        }