getChannelMembersWithTeamDataForUserWithHttpInfo method

Future<Response> getChannelMembersWithTeamDataForUserWithHttpInfo(
  1. String userId, {
  2. int? page,
  3. int? pageSize,
})

Get all channel members from all teams for a user

Get all channel members from all teams for a user. Minimum server version: 6.2.0 ##### Permissions Logged in as the user, or have edit_other_users permission.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): The ID of the user. This can also be "me" which will point to the current user.

  • int page: Page specifies which part of the results to return, by PageSize.

  • int pageSize: PageSize specifies the size of the returned chunk of results.

Implementation

Future<Response> getChannelMembersWithTeamDataForUserWithHttpInfo(
  String userId, {
  int? page,
  int? pageSize,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/channel_members'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (pageSize != null) {
    queryParams.addAll(_queryParams('', 'pageSize', pageSize));
  }

  const contentTypes = <String>[];

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