batchAddRole method

Future<BatchAddRoleOutput> batchAddRole({
  1. required List<String> accessorIds,
  2. required Role role,
  3. required String spaceId,
})

Add a role to multiple users or groups in a private re:Post.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter accessorIds : The user or group accessor identifiers to add the role to.

Parameter role : The role to add to the users or groups.

Parameter spaceId : The unique ID of the private re:Post.

Implementation

Future<BatchAddRoleOutput> batchAddRole({
  required List<String> accessorIds,
  required Role role,
  required String spaceId,
}) async {
  final $payload = <String, dynamic>{
    'accessorIds': accessorIds,
    'role': role.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/spaces/${Uri.encodeComponent(spaceId)}/roles',
    exceptionFnMap: _exceptionFns,
  );
  return BatchAddRoleOutput.fromJson(response);
}