TwitchEventSub

class TwitchEventSub(httpClient: HttpClient, config: TwitchKtConfig, eventSubResource: EventSubResource)

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient, config: TwitchKtConfig, eventSubResource: EventSubResource)

Properties

Link copied to clipboard
Link copied to clipboard
val events: SharedFlow<TwitchEvent>
Link copied to clipboard
val sessionId: StateFlow<String?>

Functions

Link copied to clipboard
suspend fun clearSubscriptions()

Removes all subscriptions from the local subscription list.

Link copied to clipboard
suspend fun connect(scope: CoroutineScope)
Link copied to clipboard
suspend fun disconnect()
Link copied to clipboard
suspend fun subscribe(subscription: EventSubSubscriptionType)

Registers a subscription to be created on the current EventSub session.

Link copied to clipboard
suspend fun unsubscribe(subscription: EventSubSubscriptionType)

Removes a subscription from the local subscription list.