Skip to content

Commit

Permalink
chore: deprecate poll bits due to twitch change (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Sep 3, 2022
1 parent 7a41221 commit b732834
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
Expand Up @@ -7,21 +7,25 @@
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* @deprecated Twitch no longer supports bits on polls.
*/
@Data
@Setter(AccessLevel.PRIVATE)
@NoArgsConstructor
@Deprecated
public class BitsVoting {

/**
* Indicates if Bits can be used for voting.
*/
@Accessors(fluent = true)
@JsonProperty("is_enabled")
private Boolean isEnabled;
private Boolean isEnabled = false;

/**
* Number of Bits required to vote once with Bits.
*/
private Integer amountPerVote;
private Integer amountPerVote = 0;

}
Expand Up @@ -45,8 +45,11 @@ public class PollChoice {

/**
* Number of votes received via Bits.
*
* @deprecated Twitch no longer supports bits on polls.
*/
@Nullable
@Deprecated
private Integer bitsVotes;

}
Expand Up @@ -39,7 +39,10 @@ public abstract class ChannelPollEvent extends EventSubChannelEvent {

/**
* The Bits voting settings for the poll.
*
* @deprecated Twitch no longer supports bits on polls.
*/
@Deprecated
private BitsVoting bitsVoting;

/**
Expand Down
Expand Up @@ -24,6 +24,7 @@ public class PollData {
private Integer totalVoters;
private Long remainingDurationMilliseconds;
private Contributor topContributor;
@Deprecated
private Contributor topBitsContributor;
private Contributor topChannelPointsContributor;

Expand All @@ -32,6 +33,7 @@ public static class PollSettings {
private Setting multiChoice;
private Setting subscriberOnly;
private Setting subscriberMultiplier;
@Deprecated
private Setting bitsVotes;
private Setting channelPointsVotes;

Expand All @@ -54,13 +56,15 @@ public static class PollChoice {
@Data
public static class Votes {
private Long total;
@Deprecated
private Long bits;
private Long channelPoints;
private Long base;
}

@Data
public static class Tokens {
@Deprecated
private Long bits;
private Long channelPoints;
}
Expand All @@ -69,6 +73,7 @@ public static class Tokens {
public static class Contributor {
private String userId;
private String displayName;
@Deprecated
private Long bitsContributed;
private Long channelPointsContributed;
}
Expand Down
Expand Up @@ -64,14 +64,20 @@ public class Poll {

/**
* Indicates whether Bits can be used for voting. Default: false.
*
* @deprecated Twitch no longer supports bits on polls.
*/
@Deprecated
@Accessors(fluent = true)
@JsonProperty("bits_voting_enabled")
private Boolean isBitsVotingEnabled;
private Boolean isBitsVotingEnabled = false;

/**
* Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000.
*
* @deprecated Twitch no longer supports bits on polls.
*/
@Deprecated
private Integer bitsPerVote;

/**
Expand Down

0 comments on commit b732834

Please sign in to comment.