getChannelMembersForUserWithHttpInfo method

Future<Response> getChannelMembersForUserWithHttpInfo(
  1. String userId,
  2. String teamId
)

Get channel memberships and roles for a user

Get all channel memberships and associated membership roles (i.e. channel_user, channel_admin) for a user on a specific team. ##### Permissions Logged in as the user and view_team permission for the team. Having manage_system permission voids the previous requirements.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): User GUID

  • String teamId (required): Team GUID

Implementation

Future<Response> getChannelMembersForUserWithHttpInfo(
  String userId,
  String teamId,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/teams/{team_id}/channels/members'
      .replaceAll('{user_id}', userId)
      .replaceAll('{team_id}', teamId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];

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