autocompleteUsersWithHttpInfo method
Autocomplete users
Get a list of users for the purpose of autocompleting based on the provided search term. Specify a combination of team_id
and channel_id
to filter results further. ##### Permissions Requires an active session and view_team
and read_channel
on any teams or channels used to filter the results further.
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> autocompleteUsersWithHttpInfo(
String name, {
String? teamId,
String? channelId,
int? limit,
}) async {
// ignore: prefer_const_declarations
final path = r'/users/autocomplete';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (teamId != null) {
queryParams.addAll(_queryParams('', 'team_id', teamId));
}
if (channelId != null) {
queryParams.addAll(_queryParams('', 'channel_id', channelId));
}
queryParams.addAll(_queryParams('', 'name', name));
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}