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, 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
-true
to include archived streams.false
to exclude archived streams.- Returns:
- This
GetStreamsApiRequest
instance
-
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 tofalse
to exclude channels.- Returns:
- This
GetStreamsApiRequest
instance
-
withIncludePublic
Sets whether to include public streams.- Parameters:
includePublic
-true
to include public streams.false
to exclude public streams.- Returns:
- This
GetStreamsApiRequest
instance
-
withIncludeWebPublic
Sets whether to include web public streams.- Parameters:
includeWebPublic
-true
to include web public streams.false
to exclude web public streams.- Returns:
- This
GetStreamsApiRequest
instance
-
withIncludeSubscribed
Sets whether to include all streams that the user is subscribed to.- Parameters:
includeSubscribed
-true
to include all streams that the user is subscribed to.false
to exclude all streams that the user is subscribed to.- Returns:
- This
GetStreamsApiRequest
instance
-
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
-true
to include active streams.false
to exclude active streams.- Returns:
- This
GetStreamsApiRequest
instance
-
withIncludeAll
Sets whether to include all channels that the user has metadata access to.- Parameters:
includeAll
-true
to include active streams.false
to exclude streams.- Returns:
- This
GetStreamsApiRequest
instance
-
withIncludeDefault
Sets whether to include default streams.- Parameters:
includeDefault
-true
to include default streams.false
to exclude default streams.- Returns:
- This
GetStreamsApiRequest
instance
-
withOwnerSubscribed
If the user is a bot user, this sets whether to include streams that the owner user is subscribed to.- Parameters:
ownerSubscribed
-true
to include owner subscribed streams.false
to exclude owner subscribed streams.- Returns:
- This
GetStreamsApiRequest
instance
-
execute
Executes the Zulip API request for getting all streams that the user has access to.- Specified by:
execute
in interfaceExecutableApiRequest<List<Stream>>
- Returns:
- List of
Stream
objects - Throws:
ZulipClientException
- if the request was not successful
-
withIncludeAll(boolean)