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 Details

    • GetSubscriptionStatusApiRequest

      public GetSubscriptionStatusApiRequest(ZulipHttpClient client, long userId, long streamId)
      Parameters:
      client - The Zulip HTTP client
      userId - The user id to check if it is subscribed to the specified stream
      streamId - The id of the stream to check if the specified user is subscribed
  • Method Details

    • execute

      public Boolean execute() throws ZulipClientException
      Executes the Zulip API request for checking whether a user is subscribed to a stream.
      Specified by:
      execute in interface ExecutableApiRequest<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