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.Sets whether the response should include a list of partial subscriber user ids.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, 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-truefor the response to include a list of subscriber user ids.falsefor the response to include an empty list of subscriber user id.- Returns:
- This
GetSubscribedStreamsApiRequestinstance
-
withIncludePartialSubscribers
Sets whether the response should include a list of partial subscriber user ids. Note that this overrides the value set fromwithIncludePartialSubscribers().- Returns:
- This
GetSubscribedStreamsApiRequestinstance
-
execute
Executes the Zulip API request for getting streams that the user is subscribed to.- Specified by:
executein interfaceExecutableApiRequest<List<StreamSubscription>>- Returns:
- List of
StreamSubscriptionobjects - Throws:
ZulipClientException- if the request was not successful
-