getTeamsUnreadForUserWithHttpInfo method

Future<Response> getTeamsUnreadForUserWithHttpInfo(
  1. String userId,
  2. String excludeTeam, {
  3. bool? includeCollapsedThreads,
})

Get team unreads for a user

Get the count for unread messages and mentions in the teams the user is a member of. ##### Permissions Must be logged in.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): User GUID

  • String excludeTeam (required): Optional team id to be excluded from the results

  • bool includeCollapsedThreads: Boolean to determine whether the collapsed threads should be included or not

Implementation

Future<Response> getTeamsUnreadForUserWithHttpInfo(
  String userId,
  String excludeTeam, {
  bool? includeCollapsedThreads,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/teams/unread'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  queryParams.addAll(_queryParams('', 'exclude_team', excludeTeam));
  if (includeCollapsedThreads != null) {
    queryParams.addAll(_queryParams('', 'include_collapsed_threads', includeCollapsedThreads));
  }

  const contentTypes = <String>[];

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