getFileInfosForPostWithHttpInfo method

Future<Response> getFileInfosForPostWithHttpInfo(
  1. String postId, {
  2. bool? includeDeleted,
})

Get file info for post

Gets a list of file information objects for the files attached to a post. ##### Permissions Must have read_channel permission for the channel the post is in.

Note: This method returns the HTTP Response.

Parameters:

  • String postId (required): ID of the post

  • bool includeDeleted: Defines if result should include deleted posts, must have 'manage_system' (admin) permission.

Implementation

Future<Response> getFileInfosForPostWithHttpInfo(
  String postId, {
  bool? includeDeleted,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/posts/{post_id}/files/info'.replaceAll('{post_id}', postId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (includeDeleted != null) {
    queryParams.addAll(_queryParams('', 'include_deleted', includeDeleted));
  }

  const contentTypes = <String>[];

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