batchAddChannelRoleToAccessors method
Add role to multiple users or groups in a private re:Post channel.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accessorIds :
The user or group identifiers to add the role to.
Parameter channelId :
The unique ID of the private re:Post channel.
Parameter channelRole :
The channel role to add to the users or groups.
Parameter spaceId :
The unique ID of the private re:Post.
Implementation
Future<BatchAddChannelRoleToAccessorsOutput> batchAddChannelRoleToAccessors({
required List<String> accessorIds,
required String channelId,
required ChannelRole channelRole,
required String spaceId,
}) async {
final $payload = <String, dynamic>{
'accessorIds': accessorIds,
'channelRole': channelRole.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/spaces/${Uri.encodeComponent(spaceId)}/channels/${Uri.encodeComponent(channelId)}/roles',
exceptionFnMap: _exceptionFns,
);
return BatchAddChannelRoleToAccessorsOutput.fromJson(response);
}