Class UpdateMessageFlagsForNarrowApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.UpdateMessageFlagsForNarrowApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<MessageFlagsUpdateResult>
public class UpdateMessageFlagsForNarrowApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<MessageFlagsUpdateResult>
Zulip API request builder for updating message flags with a narrow.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateMessageFlagsForNarrowApiRequest(ZulipHttpClient client, int anchor, int numBefore, int numAfter, Operation operation, MessageFlag flag, Narrow... narrows) Constructs aUpdateMessageFlagsForNarrowApiRequest.UpdateMessageFlagsForNarrowApiRequest(ZulipHttpClient client, Anchor anchor, int numBefore, int numAfter, Operation operation, MessageFlag flag, Narrow... narrows) Constructs aUpdateMessageFlagsForNarrowApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes The Zulip API request for updating message flags with a narrow.withIncludeAnchor(boolean isIncludeAnchor) Sets whether a message with the specified ID matching the narrow should be included in the update range.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
ANCHOR
- See Also:
-
FLAG
- See Also:
-
INCLUDE_ANCHOR
- See Also:
-
NARROW
- See Also:
-
NUM_AFTER
- See Also:
-
NUM_BEFORE
- See Also:
-
OP
- See Also:
-
-
Constructor Details
-
UpdateMessageFlagsForNarrowApiRequest
public UpdateMessageFlagsForNarrowApiRequest(ZulipHttpClient client, Anchor anchor, int numBefore, int numAfter, Operation operation, MessageFlag flag, Narrow... narrows) Constructs aUpdateMessageFlagsForNarrowApiRequest.- Parameters:
client- The Zulip HTTP clientanchor- TheAnchorto usenumBefore- The number of messages preceding the anchor in the update rangenumAfter- The number of messages following the anchor in the update rangeoperation- TheOperationto apply for theMessageFlagflag- TheMessageFlagto add or remove to the messagesnarrows- TheNarrowexpressions to use
-
UpdateMessageFlagsForNarrowApiRequest
public UpdateMessageFlagsForNarrowApiRequest(ZulipHttpClient client, int anchor, int numBefore, int numAfter, Operation operation, MessageFlag flag, Narrow... narrows) Constructs aUpdateMessageFlagsForNarrowApiRequest.- Parameters:
client- The Zulip HTTP clientanchor- The message id anchor to filter and restrict messagesnumBefore- The number of messages preceding the anchor in the update rangenumAfter- The number of messages following the anchor in the update rangeoperation- TheOperationto apply for theMessageFlagflag- TheMessageFlagto add or remove to the messagesnarrows- TheNarrowexpressions to use
-
-
Method Details
-
withIncludeAnchor
Sets whether a message with the specified ID matching the narrow should be included in the update range.- Parameters:
isIncludeAnchor- Whether a message with the specified ID matching the narrow should be included in the update range- Returns:
- This
UpdateMessageFlagsForNarrowApiRequestinstance
-
execute
Executes The Zulip API request for updating message flags with a narrow.- Specified by:
executein interfaceExecutableApiRequest<MessageFlagsUpdateResult>- Returns:
- The result of the update
- Throws:
ZulipClientException- if the request was not successful
-