createIncomingWebhookWithHttpInfo method
Future<Response>
createIncomingWebhookWithHttpInfo(
- MmCreateIncomingWebhookRequest mmCreateIncomingWebhookRequest
Create an incoming webhook
Create an incoming webhook for a channel. ##### Permissions manage_webhooks
for the team the webhook is in. manage_others_incoming_webhooks
for the team the webhook is in if the user is different than the requester.
Note: This method returns the HTTP Response
.
Parameters:
- MmCreateIncomingWebhookRequest mmCreateIncomingWebhookRequest (required): Incoming webhook to be created
Implementation
Future<Response> createIncomingWebhookWithHttpInfo(
MmCreateIncomingWebhookRequest mmCreateIncomingWebhookRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/hooks/incoming';
// ignore: prefer_final_locals
Object? postBody = mmCreateIncomingWebhookRequest;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}