Class UpdateOwnUserPresenceApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserPresenceApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<Map<Long,
UserPresenceDetail>>
public class UpdateOwnUserPresenceApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<Map<Long,UserPresenceDetail>>
Zulip API request builder for updating own user presence.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateOwnUserPresenceApiRequest
(ZulipHttpClient client, UserPresenceStatus status) Constructs aUpdateOwnUserPresenceApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for updating own user presence.withHistoryLimitDays
(int historyLimitDays) Sets how far back in time to fetch user presence data.withLastUpdateId
(int lastUpdateId) Sets the identifier that specifies what presence data the client already has received.withNewUserInput
(boolean newUserInput) Sets whether new user interaction has occurred.withPingOnly
(boolean pingOnly) Sets whether the client is sending a ping-only request.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
HISTORY_LIMIT_DAYS
- See Also:
-
LAST_UPDATE_ID
- See Also:
-
NEW_USER_INPUT
- See Also:
-
PING_ONLY
- See Also:
-
STATUS
- See Also:
-
-
Constructor Details
-
UpdateOwnUserPresenceApiRequest
Constructs aUpdateOwnUserPresenceApiRequest
.- Parameters:
client
- The Zulip HTTP clientstatus
- The status of the user
-
-
Method Details
-
withHistoryLimitDays
Sets how far back in time to fetch user presence data.- Parameters:
historyLimitDays
- how far back in time to fetch user presence data- Returns:
- This
UpdateOwnUserPresenceApiRequest
instance - See Also:
-
withLastUpdateId
Sets the identifier that specifies what presence data the client already has received.- Parameters:
lastUpdateId
- The identifier that specifies what presence data the client already has received- Returns:
- This
UpdateOwnUserPresenceApiRequest
instance - See Also:
-
withNewUserInput
Sets whether new user interaction has occurred.- Parameters:
newUserInput
- whether new user interaction has occurred- Returns:
- This
UpdateOwnUserPresenceApiRequest
instance - See Also:
-
withPingOnly
Sets whether the client is sending a ping-only request.- Parameters:
pingOnly
- whether this is ping-only request- Returns:
- This
UpdateOwnUserPresenceApiRequest
instance - See Also:
-
execute
Executes the Zulip API request for updating own user presence.- Specified by:
execute
in interfaceExecutableApiRequest<Map<Long,
UserPresenceDetail>> - Returns:
- Map of
UserPresenceDetail
keyed by user id - Throws:
ZulipClientException
- if the request was not successful
-