TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixVideoApi

The Helix API methods that deal with videos.

Overview

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

Example

const api = new ApiClient({ authProvider });
const { data: videos } = await api.videos.getVideosByUser('125328655');

Methods

deleteVideosByIds(broadcaster, ids)

async

Deletes videos by its IDs.

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 delete the videos for.

idsstring[]none

The IDs of the videos to delete.

Return type: void

getVideoById(id)

async

Gets the video data for the given video ID.

ParameterTypeRequiredDefaultDescription
idstringnone

The video ID you want to look up.

Return type: HelixVideo | null

getVideoByIdBatched(id)

async

Gets the video data for the given video ID, batching multiple calls into fewer requests as the API allows.

ParameterTypeRequiredDefaultDescription
idstringnone

The video ID you want to look up.

Return type: HelixVideo | null

getVideosByGame(gameId, filter)

async

Gets the videos of the given game.

ParameterTypeRequiredDefaultDescription
gameIdstringnone

The game you want to get videos from.

filterHelixPaginatedVideoFilter<complex>see below
filter.afterstringnone

A cursor to get the following page of.

filter.beforestringnone

A cursor to get the previous page of.

filter.languagestringnone

The language of the videos.

filter.limitnumbernone

The number of results per page.

filter.orderByHelixVideoSortnone

The value to order the videos by.

filter.periodHelixVideoFilterPeriodnone

The period of time when the videos were created.

filter.type
HelixVideoType

Aliased type: "upload" | "archive" | "highlight"

| "all"
none

The type of the videos.

getVideosByGamePaginated(gameId, filter)

Creates a paginator for videos of the given game.

ParameterTypeRequiredDefaultDescription
gameIdstringnone

The game you want to get videos from.

filterHelixVideoFilter<complex>see below
filter.languagestringnone

The language of the videos.

filter.orderByHelixVideoSortnone

The value to order the videos by.

filter.periodHelixVideoFilterPeriodnone

The period of time when the videos were created.

filter.type
HelixVideoType

Aliased type: "upload" | "archive" | "highlight"

| "all"
none

The type of the videos.

Return type: HelixPaginatedRequest<HelixVideoData, HelixVideo>

getVideosByIds(ids)

async

Gets the video data for the given list of video IDs.

ParameterTypeRequiredDefaultDescription
idsstring[]none

The video IDs you want to look up.

Return type: HelixVideo[]

getVideosByUser(user, filter)

async

Gets the videos of the given user.

ParameterTypeRequiredDefaultDescription
user
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 you want to get videos from.

filterHelixPaginatedVideoFilter<complex>see below
filter.afterstringnone

A cursor to get the following page of.

filter.beforestringnone

A cursor to get the previous page of.

filter.languagestringnone

The language of the videos.

filter.limitnumbernone

The number of results per page.

filter.orderByHelixVideoSortnone

The value to order the videos by.

filter.periodHelixVideoFilterPeriodnone

The period of time when the videos were created.

filter.type
HelixVideoType

Aliased type: "upload" | "archive" | "highlight"

| "all"
none

The type of the videos.

getVideosByUserPaginated(user, filter)

Creates a paginator for videos of the given user.

ParameterTypeRequiredDefaultDescription
user
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 you want to get videos from.

filterHelixVideoFilter<complex>see below
filter.languagestringnone

The language of the videos.

filter.orderByHelixVideoSortnone

The value to order the videos by.

filter.periodHelixVideoFilterPeriodnone

The period of time when the videos were created.

filter.type
HelixVideoType

Aliased type: "upload" | "archive" | "highlight"

| "all"
none

The type of the videos.

Return type: HelixPaginatedRequest<HelixVideoData, HelixVideo>