Class CreatorGoal

java.lang.Object
com.github.twitch4j.helix.domain.CreatorGoal

public class CreatorGoal extends Object
  • Constructor Details

    • CreatorGoal

      public CreatorGoal()
  • Method Details

    • getId

      public String getId()
      An ID that uniquely identifies this goal.
    • getBroadcasterId

      public String getBroadcasterId()
      An ID that uniquely identifies the broadcaster.
    • getBroadcasterName

      public String getBroadcasterName()
      The broadcaster’s display name.
    • getBroadcasterLogin

      public String getBroadcasterLogin()
      The broadcaster’s user handle.
    • getType

      public GoalType getType()
      The type of goal.
    • getDescription

      public String getDescription()
      A description of the goal, if specified.

      The description may contain a maximum of 40 characters.

    • getCurrentAmount

      public Integer getCurrentAmount()
      The current value.

      If type is 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.

      If type is 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.

      If type is GoalType.SUB_COUNT, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.

      If type is 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.

      If type is GoalType.NEW_SUB_COUNT, this field is increased by 1 for each new subscription.

      If type is GoalType.BITS, this field is increased by the number of bits cheered.

      If type is GoalType.CHEERS, this field is increased by 1 for each new cheer.

      See Also:
    • getTargetAmount

      public Integer getTargetAmount()
      The goal’s target value.

      For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400.

    • getCreatedAt

      public Instant getCreatedAt()
      The UTC timestamp in RFC 3339 format, which indicates when the broadcaster created the goal.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object