deleteNetwork method
Deletes a Wickr network and all its associated resources, including users, bots, security groups, and settings. This operation is permanent and cannot be undone.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter networkId :
The ID of the Wickr network to delete.
Parameter clientToken :
A unique identifier for this request to ensure idempotency. If you retry a
request with the same client token, the service will return the same
response without attempting to delete the network again.
Implementation
Future<DeleteNetworkResponse> deleteNetwork({
required String networkId,
String? clientToken,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Client-Token': clientToken.toString(),
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/networks/${Uri.encodeComponent(networkId)}',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return DeleteNetworkResponse.fromJson(response);
}