Class CreatorGoalsEvent

Direct Known Subclasses:
CreatorGoalsBeginEvent, CreatorGoalsEndEvent, CreatorGoalsProgressEvent

public abstract class CreatorGoalsEvent extends EventSubChannelEvent
See Also:
  • Constructor Details

    • CreatorGoalsEvent

      public CreatorGoalsEvent()
  • Method Details

    • getId

      public String getId()
      An ID that identifies this event.
    • 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 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.

      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.

    • 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.

    • getStartedAt

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

      public String toString()
      Overrides:
      toString in class EventSubChannelEvent
    • equals

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

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class EventSubChannelEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class EventSubChannelEvent