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: add clip offset and new goal types #608

Merged
merged 2 commits into from Jul 22, 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 @@ -25,6 +25,20 @@ public enum GoalType {
* This type shows only the net increase in subscriptions (it does not account for users that stopped subscribing since the goal's inception).
*/
@JsonAlias("new_subscription")
NEW_SUBSCRIPTIONS
NEW_SUBSCRIPTIONS,

/**
* The goal is to increase subscriptions.
* This type shows the net increase or decrease in the number of subscriptions.
*/
@JsonAlias("subscription_count")
SUB_COUNT,

/**
* The goal is to increase subscriptions.
* 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

}
Expand Up @@ -64,6 +64,9 @@ public class Clip {
/** Duration of the Clip in seconds (up to 0.1 precision). */
private Float duration;

/** The zero-based offset, in seconds, to where the clip starts in the video (VOD) or stream. */
private Integer vodOffset;

/**
* @return the timestamp for the clip's creation
* @deprecated in favor of getCreatedAtInstant()
Expand Down
Expand Up @@ -48,11 +48,20 @@ public class CreatorGoal {
/**
* The current value.
* <p>
* If the goal is to increase followers, this field is set to the current number of followers.
* This number increases with new followers and decreases if users unfollow the channel.
* If type is {@link GoalType#FOLLOWERS}, this field is set to the broadcaster's current number of followers.
* This number increases with new followers and decreases when users unfollow the broadcaster.
* <p>
* For subscriptions, current_amount is increased and decreased by the points value associated with the subscription tier.
* For example, if a tier-two subscription is worth 2 points, current_amount is increased or decreased by 2, not 1.
* If type is {@link GoalType#SUBSCRIPTIONS}, this field is increased and decreased by the points value associated with the subscription tier.
* For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.
* <p>
* If type is {@link GoalType#SUB_COUNT}, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.
* <p>
* If type is {@link GoalType#NEW_SUBSCRIPTIONS}, this field is increased by the points value associated with the subscription tier.
* 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.
*
* @see #getType()
*/
private Integer currentAmount;

Expand Down