Skip to content

Subscription

A base subscription. Used as a parent of every type of subscription.

Extended by

Type parameters

Type parameterValue
T extends SubscriptionTypesSubscriptionTypes

Constructors

new Subscription()

1
new Subscription<T>(options: SubscriptionOptions<T>, data: PostEventSubSubscription): Subscription<T>

Builds up a Base Subscription.

Parameters

ParameterTypeDescription
optionsSubscriptionOptions<T>The options for the subscription.
dataPostEventSubSubscriptionThe data from the API.

Returns

Subscription<T>

Source

twitchfy/packages/eventsub/src/structures/Subscription.ts:57

Properties

PropertyModifierTypeDescription
costreadonlynumberThe cost of the subscription. If the subscription doesn’t needs an authorization this could be 1 (or 0 if the target user has authorized within your application) if not it will be 0. Maximum accumulated cost for webhooks subscriptions is 10000 while for websocket subscriptions is 3.
createdAtreadonlyDateThe date when the subscription was created.
idreadonlystringThe ID of the subscription.
noncepublicstringThe nonce of the subscription. An unique identifier which you can set to separate same type subscriptions.
optionsreadonlySubscriptionTypeOptions[T]The options used to create the subscription.
statuspublicstringThe status of the subscription. Normally is ‘enabled’.
typereadonlyTThe type of the subscription.
versionreadonlystringThe version of the subscription. This version is the latest version of the subscription type.