Class ChannelSubscriptionTopic

java.lang.Object
com.github.twitch4j.helix.webhooks.topics.TwitchWebhookTopic<SubscriptionEventList>
com.github.twitch4j.helix.webhooks.topics.ChannelSubscriptionTopic

@Deprecated @ScheduledForRemoval(inVersion="2.0.0") public class ChannelSubscriptionTopic extends TwitchWebhookTopic<SubscriptionEventList>
Deprecated.
Twitch decommissioned this API; please migrate to EventSub
This webhook notifies you when:
  • A payment has been processed for a subscription or unsubscription.
  • A user who is subscribed to a broadcaster notifies the broadcaster of their subscription in the chat.
  • Field Details

  • Constructor Details

    • ChannelSubscriptionTopic

      @Deprecated public ChannelSubscriptionTopic(@NonNull @NonNull String broadcasterId, String userId)
      This webhook notifies you when:
      • A payment has been processed for a subscription or unsubscription.
      • A user who is subscribed to a broadcaster notifies the broadcaster of their subscription in the chat.
      Parameters:
      broadcasterId - Required. User ID of the broadcaster. Must match the User ID in the Bearer token.
      userId - Optional. ID of the subscribed user. Currently only one user_id at a time can be queried.
    • ChannelSubscriptionTopic

      @Deprecated public ChannelSubscriptionTopic(@NonNull @NonNull String broadcasterId, String userId, String gifterId, String gifterName)
      This webhook notifies you when:
      • A payment has been processed for a subscription or unsubscription.
      • A user who is subscribed to a broadcaster notifies the broadcaster of their subscription in the chat.
      Parameters:
      broadcasterId - Required. User ID of the broadcaster. Must match the User ID in the Bearer token.
      userId - Optional. ID of the subscribed user.
      gifterId - Optional. ID of the user who gifted the sub. Returns an empty string for non-gifts, "274598607" for anonymous gifts
      gifterName - Optional. Display name of the user who gifted the sub. Returns an empty string for non-gifts, "AnAnonymousGifter" for anonymous gifts
  • Method Details

    • getBroadcasterId

      public String getBroadcasterId()
      Deprecated.
      Returns:
      The user ID of the broadcaster.
    • getUserId

      public Optional<String> getUserId()
      Deprecated.
      Returns:
      The ID of the subscribed user.
    • getGifterId

      public Optional<String> getGifterId()
      Deprecated.
      Returns:
      ID of the user who gifted the sub.
    • getGifterName

      public Optional<String> getGifterName()
      Deprecated.
      Returns:
      Display name of the user who gifted the sub.