Overview
Can be accessed using client.helix.hypeTrain on an ApiClient instance.
Example
const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const { data: events } = await api.helix.hypeTrain.getHypeTrainEventsForBroadcaster('125328655');
Methods
getHypeTrainEventById(id)
asyncRetrieves a single Hype Train event by ID.
| Parameter | Type | Description |
|---|---|---|
| id | string | The ID of the Hype Train event. |
Return type: HelixHypeTrainEvent | null
getHypeTrainEventsForBroadcaster(broadcaster, pagination)
asyncRetrieves the events of the current or latest Hype Train for the specified broadcaster.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster to fetch Hype Train events for. |
| pagination | HelixForwardPagination | |
| pagination.after | string | A cursor to get the following page of. |
| pagination.limit | string | The number of results per page. |
Return type: HelixPaginatedResult<HelixHypeTrainEvent>
getHypeTrainEventsForBroadcasterPaginated(broadcaster)
Creates a paginator for the events of the current or latest Hype Train for the specified broadcaster.
| Parameter | Type | Description |
|---|---|---|
| broadcaster | UserIdResolvable | The broadcaster to fetch Hype Train events for. |
Return type: HelixPaginatedRequest<HelixEventData<HelixHypeTrainEventData,
HelixHypeTrainEventType
>, HelixHypeTrainEvent>The different types a Hype Train event can have.
Aliased type: "hypetrain.progression"