Class ChannelPointsCustomRewardRedemptionAdd
java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.channel.channel_points.redemption.ChannelPointsCustomRewardRedemptionAdd
- All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>
A viewer has redeemed a custom channel points reward on the specified channel
- Author:
- gmt2001
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The status of the redemption -
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 notificationChannelPointsCustomRewardRedemptionAdd
(String broadcaster_user_id) Constructor.ChannelPointsCustomRewardRedemptionAdd
(String broadcaster_user_id, String reward_id) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe broadcaster's user ID.The broadcaster's user login.The broadcaster's user display name.id()
The redemption identifier.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 createdTimestamp of when the reward was redeemed.RFC3339 timestamp of when the reward was redeemed as a string.reward()
Basic information about the reward that was redeemed, at the time it was redeemed.status()
The status of the redemption.The status of the redemption as a string.userId()
User ID of the user that redeemed the reward.The user input provided.Login of the user that redeemed the reward.userName()
Display name of the user that redeemed the reward.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
-
ChannelPointsCustomRewardRedemptionAdd
public ChannelPointsCustomRewardRedemptionAdd()Only used by EventSub for handler registration -
ChannelPointsCustomRewardRedemptionAdd
Used byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notification- Parameters:
e
- The event
-
ChannelPointsCustomRewardRedemptionAdd
Constructor. Subscribes to all rewards for the broadcaster- Parameters:
broadcaster_user_id
- The user id of the broadcaster
-
ChannelPointsCustomRewardRedemptionAdd
Constructor. Subscribes only to the specified reward for the broadcaster- Parameters:
broadcaster_user_id
- The user id of the broadcasterreward_id
- The id of the reward
-
-
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
User ID of the user that redeemed the reward.- Returns:
-
userLogin
Login of the user that redeemed the reward.- Returns:
-
userName
Display name of the user that redeemed the reward.- Returns:
-
id
The redemption identifier.- Returns:
-
userInput
The user input provided. Empty string if not provided.- Returns:
-
statusString
The status of the redemption as a string.- Returns:
-
status
The status of the redemption.- Returns:
-
reward
Basic information about the reward that was redeemed, at the time it was redeemed.- Returns:
-
redeemedAtString
RFC3339 timestamp of when the reward was redeemed as a string.- Returns:
-
redeemedAt
Timestamp of when the reward was redeemed.- Returns:
-