Package com.github.twitch4j.helix.domain
Class Poll
java.lang.Object
com.github.twitch4j.helix.domain.Poll
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionPoll()
Poll
(String id, String broadcasterId, String broadcasterName, String broadcasterLogin, String title, List<PollChoice> choices, Boolean isBitsVotingEnabled, Integer bitsPerVote, Boolean isChannelPointsVotingEnabled, Integer channelPointsPerVote, PollStatus status, Integer durationSeconds, Instant startedAt, @Nullable Instant endedAt) Deprecated.Twitch no longer supports bits on polls. -
Method Summary
Modifier and TypeMethodDescriptionstatic Poll.PollBuilder
builder()
protected boolean
boolean
Deprecated.Twitch no longer supports bits on polls.ID of the broadcaster.Login name of the broadcaster.Display name of the broadcaster.Number of Channel Points required to vote once with Channel Points.The poll choices.@Nullable Duration
Total duration for the poll (in seconds).@Nullable Instant
UTC timestamp for the poll’s start time.getId()
ID of the poll.UTC timestamp for the poll’s start time.Poll status.getTitle()
Question displayed for the poll.int
hashCode()
Deprecated.Twitch no longer supports bits on polls.Indicates whether Channel Points can be used for voting.toString()
withBitsPerVote
(Integer bitsPerVote) Deprecated.Twitch no longer supports bits on polls.withBroadcasterId
(String broadcasterId) ID of the broadcaster.withBroadcasterLogin
(String broadcasterLogin) Login name of the broadcaster.withBroadcasterName
(String broadcasterName) Display name of the broadcaster.withChannelPointsPerVote
(Integer channelPointsPerVote) Number of Channel Points required to vote once with Channel Points.withChoices
(List<PollChoice> choices) The poll choices.withDurationSeconds
(Integer durationSeconds) Total duration for the poll (in seconds).withEndedAt
(@Nullable Instant endedAt) UTC timestamp for the poll’s start time.ID of the poll.withIsBitsVotingEnabled
(Boolean isBitsVotingEnabled) Deprecated.Twitch no longer supports bits on polls.withIsChannelPointsVotingEnabled
(Boolean isChannelPointsVotingEnabled) Indicates whether Channel Points can be used for voting.withStartedAt
(Instant startedAt) UTC timestamp for the poll’s start time.withStatus
(PollStatus status) Poll status.Question displayed for the poll.
-
Constructor Details
-
Poll
public Poll() -
Poll
public Poll(String id, String broadcasterId, String broadcasterName, String broadcasterLogin, String title, List<PollChoice> choices, Boolean isBitsVotingEnabled, Integer bitsPerVote, Boolean isChannelPointsVotingEnabled, Integer channelPointsPerVote, PollStatus status, Integer durationSeconds, Instant startedAt, @Nullable @Nullable Instant endedAt) Deprecated.Twitch no longer supports bits on polls.Creates a newPoll
instance.- Parameters:
id
- ID of the poll.broadcasterId
- ID of the broadcaster.broadcasterName
- Display name of the broadcaster.broadcasterLogin
- Login name of the broadcaster.title
- Question displayed for the poll. Maximum: 60 characters.choices
- The poll choices. Minimum: 2 choices. Maximum: 5 choices.isBitsVotingEnabled
- Indicates whether Bits can be used for voting. Default: false.bitsPerVote
- Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000.isChannelPointsVotingEnabled
- Indicates whether Channel Points can be used for voting. Default: false.channelPointsPerVote
- Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000.status
- Poll status.durationSeconds
- Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800.startedAt
- UTC timestamp for the poll’s start time.endedAt
- UTC timestamp for the poll’s start time.
-
-
Method Details
-
getDuration
- Returns:
- the total duration for the poll.
-
builder
-
toBuilder
-
withId
ID of the poll.- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withBroadcasterId
ID of the broadcaster.- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withBroadcasterName
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
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
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
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.Twitch no longer supports bits on polls.Indicates whether Bits can be used for voting. Default: false.- Returns:
this
.
-
withBitsPerVote
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
Indicates whether Channel Points can be used for voting. Default: false.- Returns:
this
.
-
withChannelPointsPerVote
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
Poll status.- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withDurationSeconds
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
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
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
ID of the poll. -
getBroadcasterId
ID of the broadcaster. -
getBroadcasterName
Display name of the broadcaster. -
getBroadcasterLogin
Login name of the broadcaster. -
getTitle
Question displayed for the poll. Maximum: 60 characters. -
getChoices
The poll choices. Minimum: 2 choices. Maximum: 5 choices. -
isBitsVotingEnabled
Deprecated.Twitch no longer supports bits on polls.Indicates whether Bits can be used for voting. Default: false. -
getBitsPerVote
Deprecated.Twitch no longer supports bits on polls.Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000. -
isChannelPointsVotingEnabled
Indicates whether Channel Points can be used for voting. Default: false. -
getChannelPointsPerVote
Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000. -
getStatus
Poll status. -
getDurationSeconds
Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800. -
getStartedAt
UTC timestamp for the poll’s start time. -
getEndedAt
UTC timestamp for the poll’s start time. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-