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.

Parameter Type Required Default Description
id string none

The ID of the video.

token string none

The upload token.

Return type: void

createVideo(channel, createData)

async

Creates a new video.

Parameter Type Required Default Description
channel UserIdResolvable none

The channel to upload the video to.

createData VideoCreateData none

The data for the video.

Return type: CreatedVideo

deleteVideo(id)

async

Deletes a video.

Parameter Type Required Default Description
id string none

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.

Parameter Type Required Default Description
type
VideoType

Possible video types to search for.

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

none

Show only videos of a certain type.

languageCode string none

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.

page number none

The result page you want to retrieve.

limit number 10

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.

Parameter Type Required Default Description
game string none

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.

languageCode string none

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.

page number none

The result page you want to retrieve.

limit number 10

The number of results you want to retrieve.

Return type: Array<Video>

getVideo(id)

async

Retrieves a video by ID.

Parameter Type Required Default Description
id string none

The ID of the video.

Return type: Video

updateVideo(id, updateData)

async

Updates an already uploaded video.

Parameter Type Required Default Description
id string none

The ID of the video.

updateData VideoUpdateData none

The data to change for the video.

Return type: void