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.withExcludeArchived(boolean excludeArchived) Sets whether to exclude archived streams from the results.withIcludeCanAccessContent(boolean includeCanAccessContent) Sets whether to include all the channels that the user has content access to.withIncludeAll(boolean includeAll) Sets whether to include all channels that the user has metadata access to.withIncludeAllActive(boolean includeAllActive) Deprecated, for removal: This API element is subject to removal in a future version.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, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
EXCLUDE_ARCHIVED
- See Also:
-
INCLUDE_ALL
- See Also:
-
INCLUDE_CAN_ACCESS_CONTENT
- See Also:
-
INCLUDE_DEFAULT
- See Also:
-
INCLUDE_OWNER_SUBSCRIBED
- See Also:
-
INCLUDE_PUBLIC
- See Also:
-
INCLUDE_SUBSCRIBED
- See Also:
-
INCLUDE_WEB_PUBLIC
- See Also:
-
-
Constructor Details
-
GetStreamsApiRequest
Constructs aGetStreamsApiRequest.- Parameters:
client- The Zulip HTTP client
-
-
Method Details
-
withExcludeArchived
Sets whether to exclude archived streams from the results.- Parameters:
excludeArchived-trueto include archived streams.falseto exclude archived streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withIcludeCanAccessContent
Sets whether to include all the channels that the user has content access to.- Parameters:
includeCanAccessContent- {code true} to include all the channels that the user has content access tofalseto exclude channels.- Returns:
- This
GetStreamsApiRequestinstance
-
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
@Deprecated(forRemoval=true) public GetStreamsApiRequest withIncludeAllActive(boolean includeAllActive) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether to include active streams.- Parameters:
includeAllActive-trueto include active streams.falseto exclude active streams.- Returns:
- This
GetStreamsApiRequestinstance
-
withIncludeAll
Sets whether to include all channels that the user has metadata access to.- Parameters:
includeAll-trueto include active streams.falseto exclude 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
-
withIncludeAll(boolean)