searchArchivedChannelsWithHttpInfo method

Future<Response> searchArchivedChannelsWithHttpInfo(
  1. String teamId,
  2. MmSearchArchivedChannelsRequest mmSearchArchivedChannelsRequest
)

Search archived channels

Search archived channels on a team based on the search term provided in the request body. Minimum server version: 5.18 ##### Permissions Must have the list_team_channels permission. In server version 5.18 and later, a user without the list_team_channels permission will be able to use this endpoint, with the search results limited to the channels that the user is a member of.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> searchArchivedChannelsWithHttpInfo(
  String teamId,
  MmSearchArchivedChannelsRequest mmSearchArchivedChannelsRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/teams/{team_id}/channels/search_archived'.replaceAll('{team_id}', teamId);

  // ignore: prefer_final_locals
  Object? postBody = mmSearchArchivedChannelsRequest;

  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,
  );
}