Class MuteTopicApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.MuteTopicApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for muting or unmuting a topic.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMuteTopicApiRequest(ZulipHttpClient client, String topic, Operation operation) Constructs aMuteTopicApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for muting or unmuting a topic.withStream(String stream) Sets the name of the stream where the topic resides.withStreamId(long streamId) Sets the id of the stream where the topic resides.Methods inherited from class ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
OPERATION
- See Also:
-
STREAM
- See Also:
-
STREAM_ID
- See Also:
-
TOPIC
- See Also:
-
-
Constructor Details
-
MuteTopicApiRequest
Constructs aMuteTopicApiRequest.- Parameters:
client- The Zulip HTTP clienttopic- The name of the topic to mute or unmuteoperation- TheOperationto apply.Operation.ADDto mute the topic orOperation.REMOVEto unmute the topic
-
-
Method Details
-
withStream
Sets the name of the stream where the topic resides.- Parameters:
stream- The name of the stream where the topic resides- Returns:
- This
MuteTopicApiRequestinstance
-
withStreamId
Sets the id of the stream where the topic resides.- Parameters:
streamId- The id of the stream where the topic resides- Returns:
- This
MuteTopicApiRequestinstance
-
execute
Executes the Zulip API request for muting or unmuting a topic.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-