Files
YouTube.js/docs/API/interaction-manager.md
Ryan Sandbach 9ab528ec82 feat(Kids): Add blockChannel command to easily block channels (#503)
* 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>
2023-10-28 14:28:17 -03:00

2.4 KiB

InteractionManager

Handles direct interactions.

API

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