Class ChannelFollow
java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.channel.ChannelFollow
- All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>
A specified channel receives a follow.
- Author:
- gmt2001
-
Field Summary
FieldsFields inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
flowsubscription, messageId, messageTimestamp, subscription
-
Constructor Summary
ConstructorsConstructorDescriptionOnly used by EventSub for handler registrationUsed byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notificationChannelFollow
(String broadcaster_user_id) ConstructorChannelFollow
(String broadcaster_user_id, String moderator_user_id) Constructor -
Method Summary
Modifier and TypeMethodDescriptionThe broadcaster's user ID.The broadcaster's user login.The broadcaster's user display name.The timestamp of when the follow occurred.The timestamp of when the follow occurred as a string.protected boolean
isMatch
(EventSubSubscription subscription) Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditionsprotected void
protected EventSubSubscription
Compiles the parameters of this object into anEventSubSubscription
that can be createduserId()
The new follower's user ID.The new follower's user login.userName()
The new follower's user display name.protected void
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
Methods inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
create, delete, deleteAll, findMatchingSubscriptionId, findMatchingSubscriptionIds, getExistingSubscription, isAlreadySubscribed, messageId, messageTimestamp, onComplete, onError, onEventSubInternalEvent, onEventSubInternalRevocationEvent, onEventSubInternalVerificationEvent, onNext, onSubscribe, proposeSubscriptionInternal, proposeTransport, subscribe, subscription
-
Field Details
-
TYPE
- See Also:
-
VERSION
- See Also:
-
-
Constructor Details
-
ChannelFollow
public ChannelFollow()Only used by EventSub for handler registration -
ChannelFollow
Used byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notification- Parameters:
e
- The event
-
ChannelFollow
Constructor- Parameters:
broadcaster_user_id
- The user id of the broadcaster
-
ChannelFollow
Constructor- Parameters:
broadcaster_user_id
- The user id of the broadcastermoderator_user_id
- The ID of the moderator of the channel you want to get notifications for. If you have authorization from the broadcaster rather than a moderator, specify the broadcaster's user ID here
-
-
Method Details
-
proposeSubscription
Description copied from class:EventSubSubscriptionType
Compiles the parameters of this object into anEventSubSubscription
that can be created- Specified by:
proposeSubscription
in classEventSubSubscriptionType
- Returns:
-
validateParameters
Description copied from class:EventSubSubscriptionType
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
- Specified by:
validateParameters
in classEventSubSubscriptionType
- Throws:
IllegalArgumentException
- One of the parameters is not acceptable
-
onEventSubInternalNotificationEvent
- Overrides:
onEventSubInternalNotificationEvent
in classEventSubSubscriptionType
-
isMatch
Description copied from class:EventSubSubscriptionType
Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditions- Specified by:
isMatch
in classEventSubSubscriptionType
- Returns:
-
broadcasterUserId
The broadcaster's user ID.- Returns:
-
broadcasterUserLogin
The broadcaster's user login.- Returns:
-
broadcasterUserName
The broadcaster's user display name.- Returns:
-
userId
The new follower's user ID.- Returns:
-
userLogin
The new follower's user login.- Returns:
-
userName
The new follower's user display name.- Returns:
-
followedAtString
The timestamp of when the follow occurred as a string.- Returns:
-
followedAt
The timestamp of when the follow occurred.- Returns:
-