예제 #1
0
        public async Task <IActionResult> SerchWeatherCitiesApi([FromRoute] string cities)
        {
            string[] citiesArr   = GetCitiesSplitedWithSeparator(cities);
            var      _apiService = new ConnectWeatherApiService(new RestClient());

            var response = await _apiService.ConsumeWeatherApiService(citiesArr);

            return(await ProcessWeathersList(response));
        }
예제 #2
0
        public async Task <IActionResult> SerchWeatherCityApi([FromRoute] string city)
        {
            var _apiWeather = new ConnectWeatherApiService(new RestClient());
            var response    = await _apiWeather.ConsumeWeatherApiService(new string[1] {
                city
            });

            return(await ProcessWeathersList(response));
        }