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

feat: support new bits cheer creator goal types #971

Merged
merged 2 commits into from May 4, 2024
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
@@ -1,6 +1,7 @@
package com.github.twitch4j.eventsub.domain;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;

/**
* The type of goal.
Expand All @@ -15,14 +16,14 @@ public enum GoalType {

/**
* The goal is to increase subscriptions.
* This type shows the net increase or decrease in subscriptions.
* This type shows the net increase or decrease in tier points associated with the subscriptions.
*/
@JsonAlias({ "subscription", "sub" })
SUBSCRIPTIONS,

/**
* The goal is to increase subscriptions.
* This type shows only the net increase in subscriptions (it does not account for users that stopped subscribing since the goal's inception).
* This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).
*/
@JsonAlias({ "new_subscription", "new_sub" })
NEW_SUBSCRIPTIONS,
Expand All @@ -39,6 +40,28 @@ public enum GoalType {
* This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).
*/
@JsonAlias("new_subscription_count")
NEW_SUB_COUNT
NEW_SUB_COUNT,

/**
* The goal is to increase the amount of Bits used on the channel.
*
* @see <a href="https://twitter.com/TwitchSupport/status/1778470287564058836">Twitch Announcement</a>
*/
@JsonAlias("new_bit")
BITS,

/**
* The goal is to increase the number of unique Cheerers to Cheer on the channel.
*
* @see <a href="https://twitter.com/TwitchSupport/status/1778470287564058836">Twitch Announcement</a>
*/
@JsonAlias("new_cheerer")
CHEERS,

/**
* An unknown goal type; please create a GitHub issue.
*/
@JsonEnumDefaultValue
UNKNOWN

}
Expand Up @@ -60,6 +60,10 @@ public class CreatorGoal {
* For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.
* <p>
* If type is {@link GoalType#NEW_SUB_COUNT}, this field is increased by 1 for each new subscription.
* <p>
* If type is {@link GoalType#BITS}, this field is increased by the number of bits cheered.
* <p>
* If type is {@link GoalType#CHEERS}, this field is increased by 1 for each new cheer.
*
* @see #getType()
*/
Expand Down