TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixBitsApi

The Helix API methods that deal with bits.

Overview

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

Example

const api = new ApiClient({ authProvider });
const leaderboard = await api.bits.getLeaderboard({ period: 'day' });

Methods

getCheermotes(broadcaster)

async

Gets all available cheermotes.

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 include custom cheermotes of.

If not given, only get global cheermotes.

Return type: HelixCheermoteList

getLeaderboard(broadcaster, params)

async

Gets a bits leaderboard of your channel.

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 user to get the leaderboard of.

paramsHelixBitsLeaderboardQuery<complex>see below
params.contextUserIdstringnone

The user ID to show.

The leaderboard will be guaranteed to include this user and then have more users before and after that user.

params.countnumbernone

The number of leaderboard entries you want to get.

params.period
HelixBitsLeaderboardPeriod

The possible time periods for a bits leaderboard.

Aliased type: "day" | "week" | "month" | "year" | "all"

none

The time period from which bits should count towards the leaderboard.

The leaderboards reset with the start of a new period, e.g. the week leaderboards reset every Monday midnight PST.

params.startDateDatenone

The time to get the bits leaderboard for.