Class GetSubscriptionStatusApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.GetSubscriptionStatusApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<Boolean>
public class GetSubscriptionStatusApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<Boolean>
Zulip API request builder for checking whether a user is subscribed to a stream.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGetSubscriptionStatusApiRequest
(ZulipHttpClient client, long userId, long streamId) Constructs aGetSubscriptionStatusApiRequest
. -
Method Summary
Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Constructor Details
-
GetSubscriptionStatusApiRequest
Constructs aGetSubscriptionStatusApiRequest
.- Parameters:
client
- The Zulip HTTP clientuserId
- The user id to check if it is subscribed to the specified streamstreamId
- The id of the stream to check if the specified user is subscribed
-
-
Method Details
-
execute
Executes the Zulip API request for checking whether a user is subscribed to a stream.- Specified by:
execute
in interfaceExecutableApiRequest<Boolean>
- Returns:
true
if the specified user is subscribed to the specified stream.false
if the user is not subscribed to the stream- Throws:
ZulipClientException
- if the request was not successful
-