C# Class Microsoft.AspNet.WebHooks.SlackWebHookReceiver

Provides an IWebHookReceiver implementation which supports WebHooks generated by Slack. A sample WebHook URI is of the form 'https://<host>/api/webhooks/incoming/slack/{id}'. For security reasons, the WebHook URI must be an https URI and the WebHook 'token' parameter must have the same value as configured in the 'MS_WebHookReceiverSecret_Slack' application setting. For details about Slack WebHooks, see https://api.slack.com/outgoing-webhooks.
Inheritance: Microsoft.AspNet.WebHooks.WebHookReceiver
Mostra file Open project: aspnet/WebHooks

Public Methods

Method Description
ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task

Private Methods

Method Description
GetSubtext ( string trigger, string text ) : string

The 'text' parameter provided by Slack contains both the trigger and the rest of the phrase. This isolates just the rest of the phrase making it easier to get in handlers.

Method Details

ReceiveAsync() public method

public ReceiveAsync ( string id, System.Web.Http.Controllers.HttpRequestContext context, HttpRequestMessage request ) : Task
id string
context System.Web.Http.Controllers.HttpRequestContext
request System.Net.Http.HttpRequestMessage
return Task