Class GetSubscribedStreamsApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.GetSubscribedStreamsApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<StreamSubscription>>
public class GetSubscribedStreamsApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<StreamSubscription>>
Zulip API request builder for getting streams that the user is subscribed to.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for getting streams that the user is subscribed to.withIncludeSubscribers
(boolean includeSubscribers) Sets whether the response should include a list of subscriber user ids.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
INCLUDE_SUBSCRIBERS
- See Also:
-
-
Constructor Details
-
GetSubscribedStreamsApiRequest
Constructs aGetSubscribedStreamsApiRequest
.- Parameters:
client
- The Zulip HTTP client
-
-
Method Details
-
withIncludeSubscribers
Sets whether the response should include a list of subscriber user ids.- Parameters:
includeSubscribers
-true
for the response to include a list of subscriber user ids.false
for the response to include an empty list of subscriber user id.- Returns:
- This
GetSubscribedStreamsApiRequest
instance
-
execute
Executes the Zulip API request for getting streams that the user is subscribed to.- Specified by:
execute
in interfaceExecutableApiRequest<List<StreamSubscription>>
- Returns:
- List of
StreamSubscription
objects - Throws:
ZulipClientException
- if the request was not successful
-