Overview
Can be accessed using client.helix.subscriptions
on
an
ApiClient
instance.
Example
const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const subscription = await api.helix.subscriptions.getSubscriptionForUser('61369223', '125328655');
Methods
getSubscriptionEventById(id)
asyncRetrieves a single subscription event by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id | string | none | The event ID. |
getSubscriptionEventsForBroadcaster(broadcaster)
asyncRetrieves the most recent subscription events for a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve subscription events for. |
getSubscriptionEventsForBroadcasterPaginated(broadcaster)
Creates a paginator for the recent subscription events for a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve subscription events for. |
getSubscriptionForUser(broadcaster, user)
asyncRetrieves the subscription data for a given user to a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none | The broadcaster to check. |
|
user | UserIdResolvable | none | The user to check. |
getSubscriptions(broadcaster)
asyncRetrieves a list of all subscriptions to a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to list subscriptions to. |
getSubscriptionsForUsers(broadcaster, users)
asyncRetrieves the subset of the given user list that is subscribed to the given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to find subscriptions to. |
|
users | Array<UserIdResolvable> | none |
The users that should be checked for subscriptions. |
getSubscriptionsPaginated(broadcaster)
Creates a paginator for all subscriptions to a given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to list subscriptions to. |