postBanUserFromComment method

Future<BanUserFromCommentResult?> postBanUserFromComment(
  1. String commentId, {
  2. bool? banEmail,
  3. bool? banEmailDomain,
  4. bool? banIP,
  5. bool? deleteAllUsersComments,
  6. String? bannedUntil,
  7. bool? isShadowBan,
  8. String? updateId,
  9. String? banReason,
  10. String? sso,
})

Parameters:

Implementation

Future<BanUserFromCommentResult?> postBanUserFromComment(String commentId, { bool? banEmail, bool? banEmailDomain, bool? banIP, bool? deleteAllUsersComments, String? bannedUntil, bool? isShadowBan, String? updateId, String? banReason, String? sso, }) async {
  final response = await postBanUserFromCommentWithHttpInfo(commentId,  banEmail: banEmail, banEmailDomain: banEmailDomain, banIP: banIP, deleteAllUsersComments: deleteAllUsersComments, bannedUntil: bannedUntil, isShadowBan: isShadowBan, updateId: updateId, banReason: banReason, sso: sso, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'BanUserFromCommentResult',) as BanUserFromCommentResult;

  }
  return null;
}