Skip to content

Commit

Permalink
feat: add clip offset and new goal types (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Jul 22, 2022
1 parent 9816647 commit 54bab93
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
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

0 comments on commit 54bab93

Please sign in to comment.