createPostsViewWithHttpInfo method

Future<Response> createPostsViewWithHttpInfo(
  1. String companyId,
  2. String postId,
  3. PostsInput postsInput
)

Increment view count for a post. Public endpoint (no authentication required).

Note: This method returns the HTTP Response.

Parameters:

  • String companyId (required): Unique identifier for the Company

  • String postId (required): Unique identifier for the Post

  • PostsInput postsInput (required):

Implementation

Future<Response> createPostsViewWithHttpInfo(String companyId, String postId, PostsInput postsInput,) async {
  // ignore: prefer_const_declarations
  final path = r'/companies/{company_id}/posts/{post_id}/view'
    .replaceAll('{company_id}', companyId)
    .replaceAll('{post_id}', postId);

  // ignore: prefer_final_locals
  Object? postBody = postsInput;

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

  const contentTypes = <String>['application/json'];


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