TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

Classes

ApiReportedRequestChatMessageDroppedErrorConfigErrorHelixAdScheduleHelixBanHelixBanUserHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixBlockedTermHelixChannelHelixChannelEditorHelixChannelEmoteHelixChannelFollowerHelixChannelReferenceHelixChannelSearchResultHelixCharityCampaignHelixCharityCampaignAmountHelixCharityCampaignDonationHelixChatBadgeSetHelixChatBadgeVersionHelixChatChatterHelixChatSettingsHelixCheermoteListHelixClipHelixContentClassificationLabelHelixCustomRewardHelixCustomRewardRedemptionHelixDropsEntitlementHelixEmoteHelixEmoteFromSetHelixEventSubConduitHelixEventSubConduitShardHelixEventSubSubscriptionHelixExtensionBitsProductHelixExtensionTransactionHelixFollowHelixFollowedChannelHelixGameHelixGoalHelixGoalApiHelixHypeTrainHelixHypeTrainAllTimeHighHelixHypeTrainContributionHelixHypeTrainSharedParticipantHelixHypeTrainStatusHelixInstalledExtensionHelixInstalledExtensionListHelixModeratedChannelHelixModeratorHelixPaginatedEventSubSubscriptionsRequestHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPaginatedSubscriptionsRequestHelixPollHelixPollChoiceHelixPredictionHelixPredictionOutcomeHelixPredictorHelixPrivilegedChatSettingsHelixPrivilegedUserHelixRaidHelixScheduleHelixScheduleSegmentHelixSentChatMessageHelixSharedChatSessionHelixSharedChatSessionParticipantHelixShieldModeStatusHelixStreamHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixTeamHelixTeamWithUsersHelixUnbanRequestHelixUserHelixUserBlockHelixUserEmoteHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixWarningStreamNotLiveError

HelixClipApi

The Helix API methods that deal with clips.

Overview

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

Example

const api = new ApiClient({ authProvider });
const clipId = await api.clips.createClip({ channel: '125328655' });

Methods

createClip(params)

async

Creates a clip of a running stream.

Returns the ID of the clip.

ParameterTypeRequiredDefaultDescription
paramsHelixClipCreateParamsnonesee below
params.channel
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 of which you want to create a clip.

params.createAfterDelaybooleannone

Add a delay before the clip creation that accounts for the usual delay in the viewing experience.

params.durationnumbernone

The duration of the clip, in seconds. The valid range is 5-60, with a precision of 0.1.

If not given, the duration of the clip will be 30 seconds.

params.titlestringnone

The title of the clip. If not given, the title of the clip will be the same as the title of the stream.

Return type: string

createClipFromVod(params)

async

Beta

This is an interface that may change without notice until it loses this beta annotation.

Creates a clip of a VOD.

Returns the ID of the clip.

ParameterTypeRequiredDefaultDescription
paramsHelixClipCreateFromVodParamsnonenone
Return type: string

getClipById(id)

async

Gets the clip identified by the given ID.

ParameterTypeRequiredDefaultDescription
idstringnone

The clip ID.

Return type: HelixClip | null

getClipByIdBatched(id)

async

Gets the clip identified by the given ID, batching multiple calls into fewer requests as the API allows.

ParameterTypeRequiredDefaultDescription
idstringnone

The clip ID.

Return type: HelixClip | null

getClipsByIds(ids)

async

Gets the clips identified by the given IDs.

ParameterTypeRequiredDefaultDescription
idsstring[]none

The clip IDs.

Return type: HelixClip[]

getClipsForBroadcaster(broadcaster, filter)

async

Gets clips for the specified broadcaster in descending order of views.

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 clips for.

filterHelixPaginatedClipFilter<complex>see below
filter.afterstringnone

A cursor to get the following page of.

filter.beforestringnone

A cursor to get the previous page of.

filter.endDatestringnone

The latest date to find clips for.

filter.isFeaturedbooleannone

The featured flag the results should have.

If not given, both featured and non-featured clips will be returned.

filter.limitnumbernone

The number of results per page.

filter.startDatestringnone

The earliest date to find clips for.

getClipsForBroadcasterPaginated(broadcaster, filter)

Creates a paginator for clips 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 clips for.

filterHelixClipFilter<complex>see below
filter.endDatestringnone

The latest date to find clips for.

filter.isFeaturedbooleannone

The featured flag the results should have.

If not given, both featured and non-featured clips will be returned.

filter.startDatestringnone

The earliest date to find clips for.

Return type: HelixPaginatedRequest<HelixClipData, HelixClip>

getClipsForGame(gameId, filter)

async

Gets clips for the specified game in descending order of views.

ParameterTypeRequiredDefaultDescription
gameIdstringnone

The game ID.

filterHelixPaginatedClipFilter<complex>see below
filter.afterstringnone

A cursor to get the following page of.

filter.beforestringnone

A cursor to get the previous page of.

filter.endDatestringnone

The latest date to find clips for.

filter.isFeaturedbooleannone

The featured flag the results should have.

If not given, both featured and non-featured clips will be returned.

filter.limitnumbernone

The number of results per page.

filter.startDatestringnone

The earliest date to find clips for.

getClipsForGamePaginated(gameId, filter)

Creates a paginator for clips for the specified game.

ParameterTypeRequiredDefaultDescription
gameIdstringnone

The game ID.

filterHelixClipFilter<complex>see below
filter.endDatestringnone

The latest date to find clips for.

filter.isFeaturedbooleannone

The featured flag the results should have.

If not given, both featured and non-featured clips will be returned.

filter.startDatestringnone

The earliest date to find clips for.

Return type: HelixPaginatedRequest<HelixClipData, HelixClip>