Esempio n. 1
0
        /// <summary>
        /// Invokes the HTTP trigger.
        /// </summary>
        /// <param name="req"><see cref="HttpRequestMessage"/> instance.</param>
        /// <param name="log"><see cref="ILogger"/> instance.</param>
        /// <returns>Returns the <see cref="HttpResponseMessage"/> instance.</returns>
        public static async Task <HttpResponseMessage> Run(HttpRequestMessage req, ILogger log)
        {
            var settings = new FunctionAppSettings();
            var client   = new HttpClient();
            var service  = new GitHubService(settings, client);

            var query  = GetQuery(req);
            var models = service.GetArmTemplateDirectoriesAsync(query);

            return(req.CreateResponse(HttpStatusCode.OK, models));
        }