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

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.

ParameterTypeDescription
idstring

The ID of the video.

tokenstring

The upload token.

Return type: void

createVideo(channel, createData)

async

Creates a new video.

ParameterTypeDescription
channelUserIdResolvable

The channel to upload the video to.

createDataVideoCreateData

The data for the video.

Return type: CreatedVideo

deleteVideo(id)

async

Deletes a video.

ParameterTypeDescription
idstring

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.

ParameterTypeDescription
type
VideoType

Possible video types to search for.

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

Show only videos of a certain type.

languageCodestring

Show only videos in a certain language.

sort
VideoSort

Possible ways to sort videos.

Aliased type: "time" | "views"

Sort the videos by specified criteria.

pagenumber

The result page you want to retrieve.

limitnumber

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.

ParameterTypeDescription
gamestring

Show only videos of a certain game.

searchPeriod
VideoSearchPeriod

Possible periods to search videos in.

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

Show only videos from a certain time period.

type
VideoType

Possible video types to search for.

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

Show only videos of a certain type.

languageCodestring

Show only videos in a certain language.

sort
VideoSort

Possible ways to sort videos.

Aliased type: "time" | "views"

Sort the videos by specified criteria.

pagenumber

The result page you want to retrieve.

limitnumber

The number of results you want to retrieve.

Return type: Array<Video>

getVideo(id)

async

Retrieves a video by ID.

ParameterTypeDescription
idstring

The ID of the video.

Return type: Video

updateVideo(id, updateData)

async

Updates an already uploaded video.

ParameterTypeDescription
idstring

The ID of the video.

updateDataVideoUpdateData

The data to change for the video.

Return type: void