Exemplo n.º 1
0
        private async Task <IList <Microsoft.Bot.Connector.Attachment> > GetCarousel(List <string> recomendacion)
        {
            List <Microsoft.Bot.Connector.Attachment> attachments = new List <Microsoft.Bot.Connector.Attachment>();

            for (int i = 1; i < recomendacion.Count; i++)
            {
                using (BingSearch videoSearch = new BingSearch())
                {
                    string video = await videoSearch.BuscarVideo($"{recomendacion[i]} trailer");

                    string image = await videoSearch.BuscarImagen($"{recomendacion[i]}");

                    attachments.Add(GetVideoCard(recomendacion[i], string.Empty, string.Empty, image, video));
                }
            }
            return(attachments);
        }