TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixHypeTrainApi

The Helix API methods that deal with Hype Trains.

Overview

Can be accessed using client.hypeTrain on an ApiClient instance.

Example

const api = new ApiClient({ authProvider });
const { data: events } = await api.hypeTrain.getHypeTrainEventsForBroadcaster('125328655');

Methods

getHypeTrainEventsForBroadcaster(broadcaster, pagination)

async

Gets the events of the current or latest Hype Train for the specified broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster to fetch Hype Train events for.

paginationHelixForwardPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.limitnumbernone

The number of results per page.

getHypeTrainEventsForBroadcasterPaginated(broadcaster)

Creates a paginator for the events of the current or latest Hype Train for the specified broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster to fetch Hype Train events for.

Return type: HelixPaginatedRequest<HelixEventData<HelixHypeTrainEventData, "hypetrain.progression">, HelixHypeTrainEvent>