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 TypeMethodDescriptionvoid
execute()
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 com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, 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
- TheOperation
to apply.Operation.ADD
to mute the topic orOperation.REMOVE
to 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
MuteTopicApiRequest
instance
-
withStreamId
Sets the id of the stream where the topic resides.- Parameters:
streamId
- The id of the stream where the topic resides- Returns:
- This
MuteTopicApiRequest
instance
-
execute
Executes the Zulip API request for muting or unmuting a topic.- Specified by:
execute
in interfaceVoidExecutableApiRequest
- Throws:
ZulipClientException
- if the request was not successful
-