Class Poll

java.lang.Object
com.github.twitch4j.helix.domain.Poll

public class Poll extends Object
  • Constructor Details

  • Method Details

    • getDuration

      @Nullable public @Nullable Duration getDuration()
      Returns:
      the total duration for the poll.
    • builder

      public static Poll.PollBuilder builder()
    • toBuilder

      public Poll.PollBuilder toBuilder()
    • withId

      public Poll withId(String id)
      ID of the poll.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBroadcasterId

      public Poll withBroadcasterId(String broadcasterId)
      ID of the broadcaster.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBroadcasterName

      public Poll withBroadcasterName(String broadcasterName)
      Display name of the broadcaster.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBroadcasterLogin

      public Poll withBroadcasterLogin(String broadcasterLogin)
      Login name of the broadcaster.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTitle

      public Poll withTitle(String title)
      Question displayed for the poll. Maximum: 60 characters.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withChoices

      public Poll withChoices(List<PollChoice> choices)
      The poll choices. Minimum: 2 choices. Maximum: 5 choices.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIsBitsVotingEnabled

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

      @Deprecated public Poll withBitsPerVote(Integer bitsPerVote)
      Deprecated.
      Twitch no longer supports bits on polls.
      Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIsChannelPointsVotingEnabled

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

      public Poll withChannelPointsPerVote(Integer channelPointsPerVote)
      Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withStatus

      public Poll withStatus(PollStatus status)
      Poll status.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDurationSeconds

      public Poll withDurationSeconds(Integer durationSeconds)
      Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withStartedAt

      public Poll withStartedAt(Instant startedAt)
      UTC timestamp for the poll’s start time.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withEndedAt

      public Poll withEndedAt(@Nullable @Nullable Instant endedAt)
      UTC timestamp for the poll’s start time.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • getId

      public String getId()
      ID of the poll.
    • getBroadcasterId

      public String getBroadcasterId()
      ID of the broadcaster.
    • getBroadcasterName

      public String getBroadcasterName()
      Display name of the broadcaster.
    • getBroadcasterLogin

      public String getBroadcasterLogin()
      Login name of the broadcaster.
    • getTitle

      public String getTitle()
      Question displayed for the poll. Maximum: 60 characters.
    • getChoices

      public List<PollChoice> getChoices()
      The poll choices. Minimum: 2 choices. Maximum: 5 choices.
    • isBitsVotingEnabled

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

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

      public Boolean isChannelPointsVotingEnabled()
      Indicates whether Channel Points can be used for voting. Default: false.
    • getChannelPointsPerVote

      public Integer getChannelPointsPerVote()
      Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000.
    • getStatus

      public PollStatus getStatus()
      Poll status.
    • getDurationSeconds

      public Integer getDurationSeconds()
      Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800.
    • getStartedAt

      public Instant getStartedAt()
      UTC timestamp for the poll’s start time.
    • getEndedAt

      @Nullable public @Nullable Instant getEndedAt()
      UTC timestamp for the poll’s start time.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object