public static async Task <HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequestMessage req, ExecutionContext context, [Table("LocationLogs")] CloudTable locationLogs, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); var config = AppConfiguration.GetConfiguration(context); var lineEvents = await req.GetWebhookEventsAsync(config.MessagingApi.AppSecret); var client = LineMessagingClientFactory.GetLineMessagingClient(config.MessagingApi.AccessToken); var app = new LineApp(client, locationLogs); await app.RunAsync(lineEvents); return(req.CreateResponse()); }
public LineController(IAuth authUtil, LineApp app) : base(authUtil) { _app = app.SetLoginInfo(_loginInfo); }