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)
asyncDeletes videos by its IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
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. | |
ids | string[] | none | The IDs of the videos to delete. |
getVideoById(id)
asyncGets the video data for the given video ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id | string | none | The video ID you want to look up. |
getVideoByIdBatched(id)
asyncGets the video data for the given video ID, batching multiple calls into fewer requests as the API allows.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id | string | none | The video ID you want to look up. |
getVideosByGame(gameId, filter)
asyncGets the videos of the given game.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
gameId | string | none | The game you want to get videos from. | |
filter | HelixPaginatedVideoFilter | <complex> | see below | |
filter.after | string | none | A cursor to get the following page of. | |
filter.before | string | none | A cursor to get the previous page of. | |
filter.language | string | none | The language of the videos. | |
filter.limit | number | none | The number of results per page. | |
filter.orderBy | HelixVideoSort | none | The value to order the videos by. | |
filter.period | HelixVideoFilterPeriod | none | The period of time when the videos were created. | |
filter.type | HelixVideoType | "all"Aliased type: "upload" | "archive" | "highlight" | none | The type of the videos. |
getVideosByGamePaginated(gameId, filter)
Creates a paginator for videos of the given game.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
gameId | string | none | The game you want to get videos from. | |
filter | HelixVideoFilter | <complex> | see below | |
filter.language | string | none | The language of the videos. | |
filter.orderBy | HelixVideoSort | none | The value to order the videos by. | |
filter.period | HelixVideoFilterPeriod | none | The period of time when the videos were created. | |
filter.type | HelixVideoType | "all"Aliased type: "upload" | "archive" | "highlight" | none | The type of the videos. |
getVideosByIds(ids)
asyncGets the video data for the given list of video IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
ids | string[] | none | The video IDs you want to look up. |
getVideosByUser(user, filter)
asyncGets the videos of the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
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. | |
filter | HelixPaginatedVideoFilter | <complex> | see below | |
filter.after | string | none | A cursor to get the following page of. | |
filter.before | string | none | A cursor to get the previous page of. | |
filter.language | string | none | The language of the videos. | |
filter.limit | number | none | The number of results per page. | |
filter.orderBy | HelixVideoSort | none | The value to order the videos by. | |
filter.period | HelixVideoFilterPeriod | none | The period of time when the videos were created. | |
filter.type | HelixVideoType | "all"Aliased type: "upload" | "archive" | "highlight" | none | The type of the videos. |
getVideosByUserPaginated(user, filter)
Creates a paginator for videos of the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
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. | |
filter | HelixVideoFilter | <complex> | see below | |
filter.language | string | none | The language of the videos. | |
filter.orderBy | HelixVideoSort | none | The value to order the videos by. | |
filter.period | HelixVideoFilterPeriod | none | The period of time when the videos were created. | |
filter.type | HelixVideoType | "all"Aliased type: "upload" | "archive" | "highlight" | none | The type of the videos. |