Class GetAllUsersApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.GetAllUsersApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<User>>
public class GetAllUsersApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<User>>
Zulip API request builder for getting all users.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetAllUsersApiRequest(ZulipHttpClient client) Constructs aGetAllUsersApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes the Zulip API request for getting all users.withClientGravatar(boolean gravatar) Sets whether to include the user gravatar image URL in the response.withIncludeCustomProfileFields(boolean includeCustomProfileFields) Sets whether to include the user custom profile fields in the response.withUserIds(Long... userIds) Limits the response to users in the given list.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
CLIENT_GRAVATAR
- See Also:
-
INCLUDE_CUSTOM_PROFILE_FIELDS
- See Also:
-
USER_IDS
- See Also:
-
-
Constructor Details
-
GetAllUsersApiRequest
Constructs aGetAllUsersApiRequest.- Parameters:
client- The Zulip HTTP client
-
-
Method Details
-
withClientGravatar
Sets whether to include the user gravatar image URL in the response.- Parameters:
gravatar-trueto include the gravatar image URL in the response.falseto not include the gravatar image URL in the response- Returns:
- This
GetAllUsersApiRequestinstance - See Also:
-
withIncludeCustomProfileFields
Sets whether to include the user custom profile fields in the response.- Parameters:
includeCustomProfileFields-trueto include user custom profile fields in the response.falseto not include user custom profile fields in the response- Returns:
- This
GetAllUsersApiRequestinstance - See Also:
-
withUserIds
Limits the response to users in the given list.- Parameters:
userIds- The user ids to limit the response to- Returns:
- This
GetAllUsersApiRequestinstance - See Also:
-
execute
Executes the Zulip API request for getting all users.- Specified by:
executein interfaceExecutableApiRequest<List<User>>- Returns:
- List of
Userobjects - Throws:
ZulipClientException- if the request was not successful
-