Class MatchesNarrowApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.MatchesNarrowApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<Map<Long,
,MessageMatch>> NarrowableApiRequest<MatchesNarrowApiRequest>
public class MatchesNarrowApiRequest
extends ZulipApiRequest
implements NarrowableApiRequest<MatchesNarrowApiRequest>, ExecutableApiRequest<Map<Long,MessageMatch>>
Zulip API request builder for checking if a set of messages matches a narrow.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for checking if a set of messages matches a narrow.withMessageIds
(long... messageIds) Sets the mandatory message ids to check.withNarrows
(Narrow... narrows) Sets the narrow expressions to check.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
MESSAGE_IDS
- See Also:
-
NARROW
- See Also:
-
-
Constructor Details
-
MatchesNarrowApiRequest
Constructs aMatchesNarrowApiRequest
.- Parameters:
client
- The Zulip HTTP client
-
-
Method Details
-
withMessageIds
Sets the mandatory message ids to check.- Parameters:
messageIds
- One or message ids to check- Returns:
- This
MatchesNarrowApiRequest
instance - See Also:
-
withNarrows
Sets the narrow expressions to check.- Specified by:
withNarrows
in interfaceNarrowableApiRequest<MatchesNarrowApiRequest>
- Parameters:
narrows
- One orNarrow
expressions to check- Returns:
- This
MatchesNarrowApiRequest
instance - See Also:
-
execute
Executes the Zulip API request for checking if a set of messages matches a narrow.- Specified by:
execute
in interfaceExecutableApiRequest<Map<Long,
MessageMatch>> - Returns:
- map keyed by message id where the value is a
MessageMatch
- Throws:
ZulipClientException
- if the request was not successful
-