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, 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
- TheAnchor
to usenumBefore
- The number of messages preceding the anchor in the update rangenumAfter
- The number of messages following the anchor in the update rangeoperation
- TheOperation
to apply for theMessageFlag
flag
- TheMessageFlag
to add or remove to the messagesnarrows
- TheNarrow
expressions 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
- TheOperation
to apply for theMessageFlag
flag
- TheMessageFlag
to add or remove to the messagesnarrows
- TheNarrow
expressions 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
UpdateMessageFlagsForNarrowApiRequest
instance
-
execute
Executes The Zulip API request for updating message flags with a narrow.- Specified by:
execute
in interfaceExecutableApiRequest<MessageFlagsUpdateResult>
- Returns:
- The result of the update
- Throws:
ZulipClientException
- if the request was not successful
-