Class Poll.PollBuilder

java.lang.Object
com.github.twitch4j.helix.domain.Poll.PollBuilder
Enclosing class:
Poll

public static class Poll.PollBuilder extends Object
  • Method Details

    • id

      public Poll.PollBuilder id(String id)
      ID of the poll.
      Returns:
      this.
    • broadcasterId

      public Poll.PollBuilder broadcasterId(String broadcasterId)
      ID of the broadcaster.
      Returns:
      this.
    • broadcasterName

      public Poll.PollBuilder broadcasterName(String broadcasterName)
      Display name of the broadcaster.
      Returns:
      this.
    • broadcasterLogin

      public Poll.PollBuilder broadcasterLogin(String broadcasterLogin)
      Login name of the broadcaster.
      Returns:
      this.
    • title

      public Poll.PollBuilder title(String title)
      Question displayed for the poll. Maximum: 60 characters.
      Returns:
      this.
    • choice

      public Poll.PollBuilder choice(PollChoice choice)
    • choices

      public Poll.PollBuilder choices(Collection<? extends PollChoice> choices)
    • clearChoices

      public Poll.PollBuilder clearChoices()
    • isBitsVotingEnabled

      @Deprecated public Poll.PollBuilder isBitsVotingEnabled(Boolean isBitsVotingEnabled)
      Deprecated.
      Twitch no longer supports bits on polls.
      Indicates whether Bits can be used for voting. Default: false.
      Returns:
      this.
    • bitsPerVote

      @Deprecated public Poll.PollBuilder bitsPerVote(Integer bitsPerVote)
      Deprecated.
      Twitch no longer supports bits on polls.
      Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000.
      Returns:
      this.
    • isChannelPointsVotingEnabled

      public Poll.PollBuilder isChannelPointsVotingEnabled(Boolean isChannelPointsVotingEnabled)
      Indicates whether Channel Points can be used for voting. Default: false.
      Returns:
      this.
    • channelPointsPerVote

      public Poll.PollBuilder channelPointsPerVote(Integer channelPointsPerVote)
      Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000.
      Returns:
      this.
    • status

      public Poll.PollBuilder status(PollStatus status)
      Poll status.
      Returns:
      this.
    • durationSeconds

      public Poll.PollBuilder durationSeconds(Integer durationSeconds)
      Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800.
      Returns:
      this.
    • startedAt

      public Poll.PollBuilder startedAt(Instant startedAt)
      UTC timestamp for the poll’s start time.
      Returns:
      this.
    • endedAt

      public Poll.PollBuilder endedAt(@Nullable @Nullable Instant endedAt)
      UTC timestamp for the poll’s start time.
      Returns:
      this.
    • build

      public Poll build()
    • toString

      public String toString()
      Overrides:
      toString in class Object