예제 #1
0
        public async Task <IActionResult> Get(string query)
        {
            HttpClientAdaptor client = new HttpClientAdaptor(_clientFactory);

            var googleImages = Google.getGoogleResults(query, client);
            var ecosiaImages = Ecosia.getEcosiaResults(query, client);
            var bingImages   = Bing.getBingResults(query, client);
            var yahooImages  = Yahoo.getYahooResults(query, client);

            Task.WaitAll(new Task <List <string> >[] { googleImages, ecosiaImages, bingImages, yahooImages });


            return(Ok(googleImages.Result.Concat(ecosiaImages.Result).Concat(bingImages.Result).Concat(yahooImages.Result).ToList()));
        }