listOrganizationMembershipsWithHttpInfo method
- String organizationId, {
- String? orderBy,
- List<
String> ? userId, - List<
String> ? emailAddress, - List<
String> ? phoneNumber, - List<
String> ? username, - List<
String> ? web3Wallet, - List<
String> ? role, - String? query,
- String? emailAddressQuery,
- String? phoneNumberQuery,
- String? usernameQuery,
- String? nameQuery,
- int? lastActiveAtBefore,
- int? lastActiveAtAfter,
- int? createdAtBefore,
- int? createdAtAfter,
- int? limit,
- int? offset,
Get a list of all members of an organization
Retrieves all user memberships for the given organization
Note: This method returns the HTTP Response
.
Parameters:
-
String organizationId (required): The organization ID.
-
String orderBy: Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. By prepending one of those values with + or -, we can choose to sort in ascending (ASC) or descending (DESC) order."
-
List<String> userId: Returns users with the user ids specified. For each user id, the
+
and-
can be prepended to the id, which denote whether the respective user id should be included or excluded from the result set. Accepts up to 100 user ids. Any user ids not found are ignored. -
List<String> emailAddress: Returns users with the specified email addresses. Accepts up to 100 email addresses. Any email addresses not found are ignored.
-
List<String> phoneNumber: Returns users with the specified phone numbers. Accepts up to 100 phone numbers. Any phone numbers not found are ignored.
-
List<String> username: Returns users with the specified usernames. Accepts up to 100 usernames. Any usernames not found are ignored.
-
List<String> web3Wallet: Returns users with the specified web3 wallet addresses. Accepts up to 100 web3 wallet addresses. Any web3 wallet addressed not found are ignored.
-
List<String> role: Returns users with the specified roles. Accepts up to 100 roles. Any roles not found are ignored.
-
String query: Returns users that match the given query. For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names. The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
-
String emailAddressQuery: Returns users with emails that match the given query, via case-insensitive partial match. For example,
email_address_query=ello
will match a user with the emailHELLO@example.com
. -
String phoneNumberQuery: Returns users with phone numbers that match the given query, via case-insensitive partial match. For example,
phone_number_query=555
will match a user with the phone number+1555xxxxxxx
. -
String usernameQuery: Returns users with usernames that match the given query, via case-insensitive partial match. For example,
username_query=CoolUser
will match a user with the usernameSomeCoolUser
. -
String nameQuery: Returns users with names that match the given query, via case-insensitive partial match.
-
int lastActiveAtBefore: Returns users whose last session activity was before the given date (with millisecond precision). Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23.
-
int lastActiveAtAfter: Returns users whose last session activity was after the given date (with millisecond precision). Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23.
-
int createdAtBefore: Returns users who have been created before the given date (with millisecond precision). Example: use 1730160000000 to retrieve users who have been created before 2024-10-29.
-
int createdAtAfter: Returns users who have been created after the given date (with millisecond precision). Example: use 1730160000000 to retrieve users who have been created after 2024-10-29.
-
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 withlimit
.
Implementation
Future<http.Response> listOrganizationMembershipsWithHttpInfo(
String organizationId, {
String? orderBy,
List<String>? userId,
List<String>? emailAddress,
List<String>? phoneNumber,
List<String>? username,
List<String>? web3Wallet,
List<String>? role,
String? query,
String? emailAddressQuery,
String? phoneNumberQuery,
String? usernameQuery,
String? nameQuery,
int? lastActiveAtBefore,
int? lastActiveAtAfter,
int? createdAtBefore,
int? createdAtAfter,
int? limit,
int? offset,
}) async {
// ignore: prefer_const_declarations
final path = r'/organizations/{organization_id}/memberships'
.replaceAll('{organization_id}', organizationId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (orderBy != null) {
queryParams.addAll(_queryParams('', 'order_by', orderBy));
}
if (userId != null) {
queryParams.addAll(_queryParams('multi', 'user_id', userId));
}
if (emailAddress != null) {
queryParams.addAll(_queryParams('multi', 'email_address', emailAddress));
}
if (phoneNumber != null) {
queryParams.addAll(_queryParams('multi', 'phone_number', phoneNumber));
}
if (username != null) {
queryParams.addAll(_queryParams('multi', 'username', username));
}
if (web3Wallet != null) {
queryParams.addAll(_queryParams('multi', 'web3_wallet', web3Wallet));
}
if (role != null) {
queryParams.addAll(_queryParams('multi', 'role', role));
}
if (query != null) {
queryParams.addAll(_queryParams('', 'query', query));
}
if (emailAddressQuery != null) {
queryParams
.addAll(_queryParams('', 'email_address_query', emailAddressQuery));
}
if (phoneNumberQuery != null) {
queryParams
.addAll(_queryParams('', 'phone_number_query', phoneNumberQuery));
}
if (usernameQuery != null) {
queryParams.addAll(_queryParams('', 'username_query', usernameQuery));
}
if (nameQuery != null) {
queryParams.addAll(_queryParams('', 'name_query', nameQuery));
}
if (lastActiveAtBefore != null) {
queryParams.addAll(
_queryParams('', 'last_active_at_before', lastActiveAtBefore));
}
if (lastActiveAtAfter != null) {
queryParams
.addAll(_queryParams('', 'last_active_at_after', lastActiveAtAfter));
}
if (createdAtBefore != null) {
queryParams
.addAll(_queryParams('', 'created_at_before', createdAtBefore));
}
if (createdAtAfter != null) {
queryParams.addAll(_queryParams('', 'created_at_after', createdAtAfter));
}
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,
);
}