Topic - Hype Train Events
Description
This topic can be used to monitor hype train events for a specified channel.
With all undocumented topics, use at your own risk.
Method Definition
Name | Type | Description |
---|---|---|
credential | OAuth2Credential | Auth Token (may not necessarily be required) |
channelId | String | Target Channel Id |
Code-Snippets
Subscribe to the topic for a given channel
- Java
- Kotlin
- Groovy
twitchClient.getPubSub().listenForHypeTrainEvents(credential, "149223493");
twitchClient.pubSub.listenForHypeTrainEvents(credential, "149223493")
twitchClient.pubSub.listenForHypeTrainEvents(credential, "149223493")
Listen for Hype Train Starts
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainStartEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainStartEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainStartEvent::class.java, System.out::println)
Listen for Hype Train Progression
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainProgressionEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainProgressionEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainProgressionEvent::class.java, System.out::println)
Listen for Hype Train Level Ups
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainLevelUpEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainLevelUpEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainLevelUpEvent::class.java, System.out::println)
Listen for Hype Train Ends
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainEndEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainEndEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainEndEvent::class.java, System.out::println)
Listen for Conductor Updates
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainConductorUpdateEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainConductorUpdateEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainConductorUpdateEvent::class.java, System.out::println)
Listen for Cooldown Expiration
- Java
- Kotlin
- Groovy
twitchClient.getEventManager().onEvent(HypeTrainCooldownExpirationEvent.class, System.out::println);
twitchClient.eventManager.onEvent(HypeTrainCooldownExpirationEvent, System.out::println)
twitchClient.eventManager.onEvent(HypeTrainCooldownExpirationEvent::class.java, System.out::println)