Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deprecate poll bits due to twitch change #634

Merged
merged 1 commit into from Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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