usersGetOrganizationMembershipsWithHttpInfo method

Future<Response> usersGetOrganizationMembershipsWithHttpInfo(
  1. String userId, {
  2. int? limit,
  3. int? offset,
})

Retrieve all memberships for a user

Retrieve a paginated list of the user's organization memberships

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): The ID of the user whose organization memberships we want to retrieve

  • int limit: Applies a limit to the number of results returned. Can be used for paginating the results together with offset.

  • int offset: Skip the first offset results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit.

Implementation

Future<http.Response> usersGetOrganizationMembershipsWithHttpInfo(
  String userId, {
  int? limit,
  int? offset,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/organization_memberships'
      .replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (offset != null) {
    queryParams.addAll(_queryParams('', 'offset', offset));
  }

  const contentTypes = <String>[];

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