Class GetStreamsApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.GetStreamsApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<Stream>>
public class GetStreamsApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<Stream>>
Zulip API request builder for getting all streams that the user has access to.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetStreamsApiRequest(ZulipHttpClient client) Constructs aGetStreamsApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes the Zulip API request for getting all streams that the user has access to.withIncludeAllActive(boolean includeAllActive) Sets whether to include active streams.withIncludeDefault(boolean includeDefault) Sets whether to include default streams.withIncludePublic(boolean includePublic) Sets whether to include public streams.withIncludeSubscribed(boolean includeSubscribed) Sets whether to include all streams that the user is subscribed to.withIncludeWebPublic(boolean includeWebPublic) Sets whether to include web public streams.withOwnerSubscribed(boolean ownerSubscribed) If the user is a bot user, this sets whether to include streams that the owner user is subscribed to.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString
-
Field Details
-
INCLUDE_PUBLIC
- See Also:
-
INCLUDE_WEB_PUBLIC
- See Also:
-
INCLUDE_SUBSCRIBED
- See Also:
-
INCLUDE_ALL_ACTIVE
- See Also:
-
INCLUDE_DEFAULT
- See Also:
-
INCLUDE_OWNER_SUBSCRIBED
- See Also:
-
-
Constructor Details
-
GetStreamsApiRequest
Constructs aGetStreamsApiRequest.- Parameters:
client- The Zulip HTTP client
-
-
Method Details
-
withIncludePublic
Sets whether to include public streams.- Parameters:
includePublic-trueto include public streams.falseto exclude public streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withIncludeWebPublic
Sets whether to include web public streams.- Parameters:
includeWebPublic-trueto include web public streams.falseto exclude web public streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withIncludeSubscribed
Sets whether to include all streams that the user is subscribed to.- Parameters:
includeSubscribed-trueto include all streams that the user is subscribed to.falseto exclude all streams that the user is subscribed to.- Returns:
- This
GetStreamsApiRequestinstance
-
withIncludeAllActive
Sets whether to include active streams.- Parameters:
includeAllActive-trueto include active streams.falseto exclude active streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withIncludeDefault
Sets whether to include default streams.- Parameters:
includeDefault-trueto include default streams.falseto exclude default streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withOwnerSubscribed
If the user is a bot user, this sets whether to include streams that the owner user is subscribed to.- Parameters:
ownerSubscribed-trueto include owner subscribed streams.falseto exclude owner subscribed streams.- Returns:
- This
GetStreamsApiRequestinstance
-
execute
Executes the Zulip API request for getting all streams that the user has access to.- Specified by:
executein interfaceExecutableApiRequest<List<Stream>>- Returns:
- List of
Streamobjects - Throws:
ZulipClientException- if the request was not successful
-