updateChannel method

Future<UpdateChannelResponse> updateChannel({
  1. required String id,
  2. String? description,
})

Updates an existing Channel.

May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter id : The ID of the Channel to update.

Parameter description : A short text description of the Channel.

Implementation

Future<UpdateChannelResponse> updateChannel({
  required String id,
  String? description,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/channels/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateChannelResponse.fromJson(response);
}