Class UpdateOwnUserStatusApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserStatusApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
public class UpdateOwnUserStatusApiRequest
extends ZulipApiRequest
implements VoidExecutableApiRequest
Zulip API request builder for updating own user status.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the Zulip API request for updating a user status.withAway
(boolean away) Deprecated, for removal: This API element is subject to removal in a future version.away is a legacy way to access the user's presence_enabled setting, with away = !withEmojiCode
(String emojiCode) Sets whether the user should be marked as "away".withEmojiName
(String emojiName) Sets whether the user should be marked as "away".withReactionType
(ReactionType type) Sets reaction type for the emoji.withStatusText
(String statusText) The text content of the status message.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
AWAY
- See Also:
-
EMOJI_CODE
- See Also:
-
EMOJI_NAME
- See Also:
-
REACTION_TYPE
- See Also:
-
STATUS_TEXT
- See Also:
-
-
Constructor Details
-
UpdateOwnUserStatusApiRequest
Constructs aUpdateOwnUserStatusApiRequest
.- Parameters:
client
- The Zulip HTTP client
-
-
Method Details
-
withAway
Deprecated, for removal: This API element is subject to removal in a future version.away is a legacy way to access the user's presence_enabled setting, with away = !presence_enabledSets whether the user should be marked as "away".- Parameters:
away
-true
to set the user status as 'away'.false
to not set the user status as 'away'- Returns:
- This
UpdateOwnUserStatusApiRequest
instance
-
withEmojiCode
Sets whether the user should be marked as "away".- Parameters:
emojiCode
- A unique identifier, defining the specific emoji codepoint requested, within the namespace of the reaction_type- Returns:
- This
UpdateOwnUserStatusApiRequest
instance
-
withEmojiName
Sets whether the user should be marked as "away".- Parameters:
emojiName
- The name for the emoji to associate with this status.- Returns:
- This
UpdateOwnUserStatusApiRequest
instance
-
withReactionType
Sets reaction type for the emoji.- Parameters:
type
- The emoji reaction type- Returns:
- This
UpdateOwnUserStatusApiRequest
instance - See Also:
-
withStatusText
The text content of the status message.- Parameters:
statusText
- The text content of the status message. Sending the empty string will clear the user's status- Returns:
- This
UpdateOwnUserStatusApiRequest
instance
-
execute
Executes the Zulip API request for updating a user status.- Specified by:
execute
in interfaceVoidExecutableApiRequest
- Throws:
ZulipClientException
- if the request was not successful
-