aiBotV1BotsWebhooksDiscordCreateWithHttpInfo method
Future<Response>
aiBotV1BotsWebhooksDiscordCreateWithHttpInfo(
- String org,
- DiscordWebhook discordWebhook
Webhook endpoint to receive and process discord messages.
Note: This method returns the HTTP Response.
Parameters:
-
String org (required):
-
DiscordWebhook discordWebhook (required):
Implementation
Future<Response> aiBotV1BotsWebhooksDiscordCreateWithHttpInfo(String org, DiscordWebhook discordWebhook,) async {
// ignore: prefer_const_declarations
final path = r'/api/ai/bot/v1/bots/webhooks/{org}/discord/'
.replaceAll('{org}', org);
// ignore: prefer_final_locals
Object? postBody = discordWebhook;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json', 'multipart/form-data', 'application/x-www-form-urlencoded'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}