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

Classes

ApiClientBadgesApiBitsApiChannelChannelApiChannelFollowChannelPlaceholderChannelSubscriptionChatApiChatBadgeListChatBadgeSetChatBadgeVersionChatEmoteChatEmoteListChattersListCheermoteListConfigErrorCreatedVideoEmoteSetListHelixApiGroupHelixBanHelixBanEventHelixBitsApiHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixChannelHelixChannelApiHelixChannelEditorHelixChannelEmoteHelixChannelPointsApiHelixChannelSearchResultHelixChatApiHelixChatBadgeSetHelixChatBadgeVersionHelixCheermoteListHelixClipHelixClipApiHelixCustomRewardHelixCustomRewardRedemptionHelixEmoteHelixEmoteFromSetHelixEventSubApiHelixEventSubSubscriptionHelixExtensionsApiHelixExtensionTransactionHelixFollowHelixGameHelixGameApiHelixHypeTrainApiHelixHypeTrainContributionHelixHypeTrainEventHelixInstalledExtensionHelixInstalledExtensionListHelixModerationApiHelixModeratorHelixModeratorEventHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPollHelixPollApiHelixPollChoiceHelixPredictionHelixPredictionApiHelixPredictionOutcomeHelixPredictorHelixPrivilegedUserHelixScheduleHelixScheduleApiHelixScheduleSegmentHelixSearchApiHelixStreamHelixStreamApiHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixSubscriptionApiHelixSubscriptionEventHelixTagHelixTagApiHelixTeamHelixTeamApiHelixTeamWithUsersHelixUserHelixUserApiHelixUserBlockHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixVideoApiHelixWebHooksApiHelixWebHookSubscriptionKrakenApiGroupNoSubscriptionProgramErrorPrivilegedChannelPrivilegedUserSearchApiStreamStreamApiStreamNotLiveErrorSubscriptionTeamTeamApiTeamWithUsersUnsupportedApiUserUserApiUserBlockUserChatInfoUserFollowUserSubscriptionVideoVideoApi

VideoApi

The API methods that deal with users.

Overview

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

Example

const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const user = await api.kraken.videos.getVideo('85448040');

Methods

completeVideoUpload(id, token)

async

Completes a video upload.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the video.

tokenstringnone

The upload token.

Return type: void

createVideo(channel, createData)

async

Creates a new video.

ParameterTypeRequiredDefaultDescription
channelUserIdResolvablenone

The channel to upload the video to.

createDataVideoCreateDatanone

The data for the video.

Return type: CreatedVideo

deleteVideo(id)

async

Deletes a video.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the video.

Return type: void

getFollowedVideos(type, languageCode, sort, page, limit)

async

Retrieves the videos from channels followed by the authenticated user.

ParameterTypeRequiredDefaultDescription
type
VideoType

Possible video types to search for.

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

none

Show only videos of a certain type.

languageCodestringnone

Show only videos in a certain language.

sort
VideoSort

Possible ways to sort videos.

Aliased type: "time" | "views"

none

Sort the videos by specified criteria.

pagenumbernone

The result page you want to retrieve.

limitnumber10

The number of results you want to retrieve.

Return type: Array<Video>

getTopVideos(game, searchPeriod, type, languageCode, sort, page, limit)

async

Retrieves the top videos.

ParameterTypeRequiredDefaultDescription
gamestringnone

Show only videos of a certain game.

searchPeriod
VideoSearchPeriod

Possible periods to search videos in.

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

none

Show only videos from a certain time period.

type
VideoType

Possible video types to search for.

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

none

Show only videos of a certain type.

languageCodestringnone

Show only videos in a certain language.

sort
VideoSort

Possible ways to sort videos.

Aliased type: "time" | "views"

none

Sort the videos by specified criteria.

pagenumbernone

The result page you want to retrieve.

limitnumber10

The number of results you want to retrieve.

Return type: Array<Video>

getVideo(id)

async

Retrieves a video by ID.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the video.

Return type: Video

updateVideo(id, updateData)

async

Updates an already uploaded video.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the video.

updateDataVideoUpdateDatanone

The data to change for the video.

Return type: void