Created
January 26, 2018 17:56
-
-
Save StefanRiedmann/6184ef25fc7838099aa807491b752426 to your computer and use it in GitHub Desktop.
Slack webhook as Azure Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class SlackWebhook | |
{ | |
[FunctionName("SlackWebhook")] | |
public static async Task<HttpResponseMessage> Run( | |
[HttpTrigger(WebHookType = "slack")] HttpRequestMessage req, | |
[Queue(Constants.TranslateRequestQueue, Connection = "AzureWebJobsStorage")] | |
ICollector<TranslateRequest> translateQueue, | |
[Queue(Constants.SearchRequestQueue, Connection = "AzureWebJobsStorage")] | |
ICollector<SearchRequest> searchQueue, | |
[Queue(Constants.SentimentRequestQueue, Connection = "AzureWebJobsStorage")] | |
ICollector<SentimentRequest> sentimentQueue, | |
[Queue(Constants.SlackmessageRequestQueue, Connection = "AzureWebJobsStorage")] | |
ICollector<SlackMessage> slackMessageQueue, | |
TraceWriter log) | |
{ | |
//see git repository for full code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment