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)
asyncCreates a clip of a running stream.
Returns the ID of the clip.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| params | HelixClipCreateParams | none | see 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.createAfterDelay | boolean | none | Add a delay before the clip creation that accounts for the usual delay in the viewing experience. |
getClipById(id)
asyncGets the clip identified by the given ID.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The clip ID. |
getClipByIdBatched(id)
asyncGets the clip identified by the given ID, batching multiple calls into fewer requests as the API allows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | none | The clip ID. |
getClipsByIds(ids)
asyncGets the clips identified by the given IDs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ids | string[] | none | The clip IDs. |
getClipsForBroadcaster(broadcaster, filter)
asyncGets clips for the specified broadcaster in descending order of views.
| 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 fetch clips for. | |
| filter | HelixPaginatedClipFilter | <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.endDate | string | none | The latest date to find clips for. | |
| filter.isFeatured | boolean | none | The featured flag the results should have. If not given, both featured and non-featured clips will be returned. | |
| filter.limit | number | none | The number of results per page. | |
| filter.startDate | string | none | The earliest date to find clips for. |
getClipsForBroadcasterPaginated(broadcaster, filter)
Creates a paginator for clips for the specified broadcaster.
| 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 fetch clips for. | |
| filter | HelixClipFilter | <complex> | see below | |
| filter.endDate | string | none | The latest date to find clips for. | |
| filter.isFeatured | boolean | none | The featured flag the results should have. If not given, both featured and non-featured clips will be returned. | |
| filter.startDate | string | none | The earliest date to find clips for. |
getClipsForGame(gameId, filter)
asyncGets clips for the specified game in descending order of views.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| gameId | string | none | The game ID. | |
| filter | HelixPaginatedClipFilter | <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.endDate | string | none | The latest date to find clips for. | |
| filter.isFeatured | boolean | none | The featured flag the results should have. If not given, both featured and non-featured clips will be returned. | |
| filter.limit | number | none | The number of results per page. | |
| filter.startDate | string | none | The earliest date to find clips for. |
getClipsForGamePaginated(gameId, filter)
Creates a paginator for clips for the specified game.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| gameId | string | none | The game ID. | |
| filter | HelixClipFilter | <complex> | see below | |
| filter.endDate | string | none | The latest date to find clips for. | |
| filter.isFeatured | boolean | none | The featured flag the results should have. If not given, both featured and non-featured clips will be returned. | |
| filter.startDate | string | none | The earliest date to find clips for. |