updateChannelWithHttpInfo method

Future<Response> updateChannelWithHttpInfo(
  1. String channelId,
  2. MmUpdateChannelRequest mmUpdateChannelRequest
)

Update a channel

Update a channel. The fields that can be updated are listed as parameters. Omitted fields will be treated as blanks. ##### Permissions If updating a public channel, manage_public_channel_members permission is required. If updating a private channel, manage_private_channel_members permission is required.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updateChannelWithHttpInfo(
  String channelId,
  MmUpdateChannelRequest mmUpdateChannelRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}'.replaceAll('{channel_id}', channelId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateChannelRequest;

  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,
  );
}