Esempio n. 1
0
        private async Task <JObject> CallStarWarsApi(IDialogContext context, string UserQuestion)
        {
            Uri APICallUrl            = new Uri("https://swapi.co/api/" + UserQuestion);
            IStarwarsRequest starwars = new StarwarsRequest();

            return(await starwars.StarWarsDataRequest(APICallUrl));
        }
Esempio n. 2
0
        private async Task <JObject> CallStarWarsApi(IDialogContext context, string ApiIntent)
        {
            Uri APICallUrl = new Uri("https://swapi.co/api/" + ApiIntent);
            IStarwarsRequest StarWarsAPI = new StarwarsRequest();

            return(await StarWarsAPI.StarWarsDataRequest(APICallUrl));
        }
        private async Task CallStarWarsApi(IDialogContext context, string UserQuestion)
        {
            Uri BaseUri = new Uri("https://swapi.co/api/" + UserQuestion);
            IStarwarsRequest starwars = new StarwarsRequest();
            JObject          Dataset  = await starwars.StarWarsDataRequest(BaseUri);

            await context.PostAsync(Dataset.ToString());
        }