deletePostWithHttpInfo method

Future<Response> deletePostWithHttpInfo(
  1. String postId
)

Delete a post

Soft deletes a post, by marking the post as deleted in the database. Soft deleted posts will not be returned in post queries. ##### Permissions Must be logged in as the user or have delete_others_posts permission.

Note: This method returns the HTTP Response.

Parameters:

  • String postId (required): ID of the post to delete

Implementation

Future<Response> deletePostWithHttpInfo(
  String postId,
) async {
  // ignore: prefer_const_declarations
  final path = r'/posts/{post_id}'.replaceAll('{post_id}', postId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];

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