patchChannelModerationsWithHttpInfo method

Future<Response> patchChannelModerationsWithHttpInfo(
  1. String channelId,
  2. MmChannelModerationPatch mmChannelModerationPatch
)

Update a channel's moderation settings.

Permissions Must have manage_system permission. Minimum server version: 5.22

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> patchChannelModerationsWithHttpInfo(
  String channelId,
  MmChannelModerationPatch mmChannelModerationPatch,
) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}/moderations/patch'.replaceAll('{channel_id}', channelId);

  // ignore: prefer_final_locals
  Object? postBody = mmChannelModerationPatch;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PUT',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}