searchChannelsWithHttpInfo method
Future<Response>
searchChannelsWithHttpInfo(
- String teamId,
- MmSearchChannelsRequest mmSearchChannelsRequest
Search channels
Search public channels on a team based on the search term provided in the request body. ##### Permissions Must have the list_team_channels
permission. In server version 5.16 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:
-
String teamId (required): Team GUID
-
MmSearchChannelsRequest mmSearchChannelsRequest (required): Search criteria
Implementation
Future<Response> searchChannelsWithHttpInfo(
String teamId,
MmSearchChannelsRequest mmSearchChannelsRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/teams/{team_id}/channels/search'.replaceAll('{team_id}', teamId);
// ignore: prefer_final_locals
Object? postBody = mmSearchChannelsRequest;
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,
);
}