searchPostsWithHttpInfo method

Future<Response> searchPostsWithHttpInfo(
  1. String teamId,
  2. MmSearchPostsRequest mmSearchPostsRequest
)

Search for team posts

Search posts in the team and from the provided terms string. ##### Permissions Must be authenticated and have the view_team permission.

Note: This method returns the HTTP Response.

Parameters:

  • String teamId (required): Team GUID

  • MmSearchPostsRequest mmSearchPostsRequest (required): The search terms and logic to use in the search.

Implementation

Future<Response> searchPostsWithHttpInfo(
  String teamId,
  MmSearchPostsRequest mmSearchPostsRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/teams/{team_id}/posts/search'.replaceAll('{team_id}', teamId);

  // ignore: prefer_final_locals
  Object? postBody = mmSearchPostsRequest;

  final queryParams = <MmQueryParam>[];
  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,
  );
}