Class GetStreamTopicsApiRequest

java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.GetStreamTopicsApiRequest
All Implemented Interfaces:
ExecutableApiRequest<List<Topic>>

public class GetStreamTopicsApiRequest extends ZulipApiRequest implements ExecutableApiRequest<List<Topic>>
Zulip API request builder for getting stream topics.
See Also:
  • Field Details

  • Constructor Details

    • GetStreamTopicsApiRequest

      public GetStreamTopicsApiRequest(ZulipHttpClient client, long streamId)
      Parameters:
      client - The Zulip HTTP client
      streamId - The id of the stream to get topics from
  • Method Details

    • allowEmptyTopicName

      public GetStreamTopicsApiRequest allowEmptyTopicName(boolean allowEmptyTopicName)
      Sets whether an empty string as a topic name is allowed in the response.
      Parameters:
      allowEmptyTopicName - true to allow empty topic names. false to disallow empty topic names;
      Returns:
    • execute

      public List<Topic> execute() throws ZulipClientException
      Executes the Zulip API request for getting stream topic.
      Specified by:
      execute in interface ExecutableApiRequest<List<Topic>>
      Returns:
      List of Topic objects
      Throws:
      ZulipClientException - if the request was not successful