mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 10:32:14 +00:00
* dev: add response types * dev: refactor `Parser#parseResponse()` * dev: update YouTube parsers * dev: update YouTube Music classes * dev: update YouTube Kids classes * dev: update core classes * dev(Parser): fix some inconsistencies * chore: update docs * chore: update docs x2 * fix: export response types * chore(docs): update parser example
46 lines
1.0 KiB
Markdown
46 lines
1.0 KiB
Markdown
# Studio
|
|
|
|
YouTube Studio class (WIP).
|
|
|
|
## API
|
|
|
|
* Studio
|
|
* [.setThumbnail(video_id, buffer)](#setthumbnail)
|
|
* [.updateVideoMetadata(video_id, metadata)](#updatemetadata)
|
|
* [.upload(file, metadata)](#upload)
|
|
|
|
<a name="setthumbnail"></a>
|
|
### setThumbnail(video_id, buffer)
|
|
|
|
Uploads a custom thumbnail and sets it for a video.
|
|
|
|
**Returns:** `Promise.<ApiResponse>`
|
|
|
|
| Param | Type | Description |
|
|
| --- | --- | --- |
|
|
| video_id | `string` | Video id |
|
|
| buffer | `Uint8Array` | Thumbnail buffer |
|
|
|
|
<a name="updatemetadata"></a>
|
|
### updateVideoMetadata(video_id, metadata)
|
|
|
|
Updates given video's metadata.
|
|
|
|
**Returns:** `Promise.<ApiResponse>`
|
|
|
|
| Param | Type | Description |
|
|
| --- | --- | --- |
|
|
| video_id | `string` | Video id |
|
|
| metadata | `VideoMetadata` | Video metadata |
|
|
|
|
<a name="upload"></a>
|
|
### upload(file, metadata)
|
|
|
|
Uploads a video to YouTube.
|
|
|
|
**Returns:** `Promise.<ApiResponse>`
|
|
|
|
| Param | Type | Description |
|
|
| --- | --- | --- |
|
|
| file | `BodyInit` | Video file |
|
|
| metadata | `UploadedVideoMetadata` | Video metadata | |