Class GetUserApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.GetUserApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<User>
Zulip API request builder for getting a user.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetUserApiRequest(ZulipHttpClient client, long userId) Constructs aGetUserApiRequest.GetUserApiRequest(ZulipHttpClient client, String email) Constructs aGetUserApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes the Zulip API request for getting a user.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.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:
-
-
Constructor Details
-
GetUserApiRequest
Constructs aGetUserApiRequest.- Parameters:
client- The Zulip HTTP clientuserId- The id of the user to get
-
GetUserApiRequest
Constructs aGetUserApiRequest.- Parameters:
client- The Zulip HTTP clientemail- The Zulip display email address of the user to get
-
-
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
GetUserApiRequestinstance
-
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
GetUserApiRequestinstance
-
execute
Executes the Zulip API request for getting a user.- Specified by:
executein interfaceExecutableApiRequest<User>- Returns:
Userobject that matched the request user id- Throws:
ZulipClientException- if the request was not successful
-