postSetCommentSpamStatusWithHttpInfo method

Future<Response> postSetCommentSpamStatusWithHttpInfo(
  1. String commentId, {
  2. bool? spam,
  3. bool? permNotSpam,
  4. String? sso,
})

Performs an HTTP 'POST /auth/my-account/moderate-comments/set-comment-spam-status/{commentId}' operation and returns the Response. Parameters:

Implementation

Future<Response> postSetCommentSpamStatusWithHttpInfo(String commentId, { bool? spam, bool? permNotSpam, String? sso, }) async {
  // ignore: prefer_const_declarations
  final path = r'/auth/my-account/moderate-comments/set-comment-spam-status/{commentId}'
    .replaceAll('{commentId}', commentId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (spam != null) {
    queryParams.addAll(_queryParams('', 'spam', spam));
  }
  if (permNotSpam != null) {
    queryParams.addAll(_queryParams('', 'permNotSpam', permNotSpam));
  }
  if (sso != null) {
    queryParams.addAll(_queryParams('', 'sso', sso));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}