twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

HelixHypeTrainApi

The Helix API methods that deal with Hype Trains.

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)

async

Retrieves a single Hype Train event by ID.

Parameter Type Required Default Description
id string none

The ID of the Hype Train event.

Return type: HelixHypeTrainEvent | null

getHypeTrainEventsForBroadcaster(broadcaster, pagination)

async

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

Parameter Type Required Default Description
broadcaster UserIdResolvable none

The broadcaster to fetch Hype Train events for.

pagination HelixForwardPagination {}
pagination.after string none

A cursor to get the following page of.

pagination.limit string none

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.

Parameter Type Required Default Description
broadcaster UserIdResolvable none

The broadcaster to fetch Hype Train events for.

Return type: HelixPaginatedRequest<HelixEventData<HelixHypeTrainEventData,
HelixHypeTrainEventType

The different types a Hype Train event can have.

Aliased type: "hypetrain.progression"

>, HelixHypeTrainEvent>