Topic - Channel Points Events
Description
This topic can be used to monitor a channel's community points events. The only officially documented subtype of this event is for a custom reward being redeemed, but this library also includes other subtypes.
Method Definition
Required Parameters
Name | Type | Description |
---|---|---|
credential | OAuth2Credential | User Auth Token for the target channel id, with the scope channel:read:redemptions |
channelId | String | Target Channel Id |
Optional Parameters
None
Code-Snippets
Subscribe to the topic for a given channel
- Java
- Kotlin
- Groovy
twitchClient.getPubSub().listenForChannelPointsRedemptionEvents(credential, "149223493");
twitchClient.pubSub.listenForChannelPointsRedemptionEvents(credential, "149223493")
twitchClient.pubSub.listenForChannelPointsRedemptionEvents(credential, "149223493")
Listen for Custom Reward Redemptions
Fired when a custom reward is redeemed in the channel.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(RewardRedeemedEvent.class, System.out::println);
twitchClient.eventManager.onEvent(RewardRedeemedEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(RewardRedeemedEvent, System.out::println)
Listen for Redemption Status Updates
Not documented by Twitch.
Fired when the status of a redemption changes (e.g. completed or rejected).
Note that, at the time of writing, the status is ACTION_TAKEN
whether the reward was completed or rejected, rather than FULFILLED
or UNFULFILLED
.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(RedemptionStatusUpdateEvent.class, System.out::println);
twitchClient.eventManager.onEvent(RedemptionStatusUpdateEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(RedemptionStatusUpdateEvent, System.out::println)
Listen for Reward Creations
Not documented by Twitch.
Fired when a custom reward is created.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(CustomRewardCreatedEvent.class, System.out::println);
twitchClient.eventManager.onEvent(CustomRewardCreatedEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(CustomRewardCreatedEvent, System.out::println)
Listen for Reward Updates
Not documented by Twitch.
Fired when a custom reward is updated.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(CustomRewardUpdatedEvent.class, System.out::println);
twitchClient.eventManager.onEvent(CustomRewardUpdatedEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(CustomRewardUpdatedEvent, System.out::println)
Listen for Reward Deletions
Not documented by Twitch.
Fired when custom reward is deleted.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(CustomRewardDeletedEvent.class, System.out::println);
twitchClient.eventManager.onEvent(CustomRewardDeletedEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(CustomRewardDeletedEvent, System.out::println)
Listen for Update Redemption Status Progress
Not documented by Twitch.
Fired when there is an update to the redemption progress.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(UpdateRedemptionProgressEvent.class, System.out::println);
twitchClient.eventManager.onEvent(UpdateRedemptionProgressEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(UpdateRedemptionProgressEvent, System.out::println)
Listen for Update Redemption Status Completion
Not documented by Twitch.
Fired when the redemption progress has completed.
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(UpdateRedemptionFinishedEvent.class, System.out::println);
twitchClient.eventManager.onEvent(UpdateRedemptionFinishedEvent::class.java, System.out::println)
twitchClient.eventManager.onEvent(UpdateRedemptionFinishedEvent, System.out::println)