Class AdBreakBegin
java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.channel.ad_break.AdBreakBegin
- All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>
An AdBreakBegin event on a specified channel.
- 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 notificationAdBreakBegin(String broadcaster_user_id) Constructor -
Method Summary
Modifier and TypeMethodDescriptionThe broadcaster's user ID.The broadcaster's user login.The broadcaster's user display name.duration()The duration of the ad break.intThe duration of the ad break in seconds.booleanWhether the ad break was automatically triggered by Twitch or manually triggered by the broadcaster or a moderator.protected booleanisMatch(EventSubSubscription subscription) Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditionsprotected voidprotected EventSubSubscriptionCompiles the parameters of this object into anEventSubSubscriptionthat can be createdThe requester's user ID.The requester's user login.The requester's user display name.The time the ad break started.The time the ad break started as a string.protected voidValidates 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
-
AdBreakBegin
public AdBreakBegin()Only used by EventSub for handler registration -
AdBreakBegin
Used byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)to construct an object from an incoming notification- Parameters:
e- The event
-
AdBreakBegin
Constructor- Parameters:
broadcaster_user_id- The user id of the broadcaster
-
-
Method Details
-
proposeSubscription
Description copied from class:EventSubSubscriptionTypeCompiles the parameters of this object into anEventSubSubscriptionthat can be created- Specified by:
proposeSubscriptionin classEventSubSubscriptionType- Returns:
-
validateParameters
Description copied from class:EventSubSubscriptionTypeValidates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()- Specified by:
validateParametersin classEventSubSubscriptionType- Throws:
IllegalArgumentException- One of the parameters is not acceptable
-
onEventSubInternalNotificationEvent
- Overrides:
onEventSubInternalNotificationEventin classEventSubSubscriptionType
-
isMatch
Description copied from class:EventSubSubscriptionTypeReturns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditions- Specified by:
isMatchin classEventSubSubscriptionType- Returns:
-
broadcasterUserId
The broadcaster's user ID.- Returns:
-
broadcasterUserLogin
The broadcaster's user login.- Returns:
-
broadcasterUserName
The broadcaster's user display name.- Returns:
-
requesterUserId
The requester's user ID.- Returns:
-
requesterUserLogin
The requester's user login.- Returns:
-
requesterUserName
The requester's user display name.- Returns:
-
startedAtString
The time the ad break started as a string.- Returns:
-
startedAt
The time the ad break started.- Returns:
-
durationSeconds
public int durationSeconds()The duration of the ad break in seconds.- Returns:
-
duration
The duration of the ad break.- Returns:
-
isAutomatic
public boolean isAutomatic()Whether the ad break was automatically triggered by Twitch or manually triggered by the broadcaster or a moderator.- Returns:
-