Esempio n. 1
0
        public async Task Execute(Cities inputTo, IRespondWithSuccessOrError <CurrentWeather, ErrorOutput> presenter)
        {
            try
            {
                var city = await _country.Fetch_City_Code(inputTo.City, inputTo.State, inputTo.Country);

                var currentWeather = await _weather.Fetch_Weather_For_Today(city.CityId);

                presenter.Respond(currentWeather);
            }
            catch (Exception ex)
            {
                presenter.Respond(new ErrorOutput(ex.Message));
            }
        }