mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 09:32:12 +00:00
* Add blockChannel command to support easily blocking content for supervised accounts. * Moved blockChannel functionality to the Kids client and updated API docs. * Fix whitepsace issues. * Resolve remaining linting errors. * Avoid changing interaction manager. Remove comment for ToggleButton change. * chore: clean up --------- Co-authored-by: LuanRT <luan.lrt4@gmail.com>
2.4 KiB
2.4 KiB
InteractionManager
Handles direct interactions.
API
- InteractionManager
like(video_id)
Likes given video.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| video_id | string |
Video id |
dislike(video_id)
Dislikes given video.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| video_id | string |
Video id |
removeLike(video_id)
Remover like/dislike.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| video_id | string |
Video id |
subscribe(channel_id)
Subscribes to given channel.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| channel_id | string |
Channel id |
unsubscribe(channel_id)
Unsubscribes from given channel.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| channel_id | string |
Channel id |
comment(video_id, text)
Posts a comment on given video.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| video_id | string |
Video id |
| text | string |
Comment content |
translate(text, target_language, args?)
Translates given text using YouTube's comment translation feature.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| text | string |
Text to be translated |
| target_language | string |
ISO language code |
| args? | object |
Additional arguments |
setNotificationPreferences(channel_id, type)
Changes notification preferences for a given channel. Only works with channels you are subscribed to.
Returns: Promise.<ApiResponse>
| Param | Type | Description |
|---|---|---|
| channel_id | string |
Channel id |
| type | string |
PERSONALIZED, ALL or NONE |