updateGuestUser method
Updates the block status of a guest user in a Wickr network. This operation allows you to block or unblock a guest user from accessing the network.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter block :
Set to true to block the guest user or false to unblock them.
Parameter networkId :
The ID of the Wickr network where the guest user's status will be updated.
Parameter usernameHash :
The username hash (unique identifier) of the guest user to update.
Implementation
Future<UpdateGuestUserResponse> updateGuestUser({
required bool block,
required String networkId,
required String usernameHash,
}) async {
final $payload = <String, dynamic>{
'block': block,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/networks/${Uri.encodeComponent(networkId)}/guest-users/${Uri.encodeComponent(usernameHash)}',
exceptionFnMap: _exceptionFns,
);
return UpdateGuestUserResponse.fromJson(response);
}