Files
YouTube.js/docs/API/interaction-manager.md
2023-01-01 23:10:38 -03:00

2.4 KiB

InteractionManager

Handles direct interactions.

API

like(video_id)

Likes given video.

Returns: Promise.<ActionsResponse>

Param Type Description
video_id string Video id

dislike(video_id)

Dislikes given video.

Returns: Promise.<ActionsResponse>

Param Type Description
video_id string Video id

removeLike(video_id)

Remover like/dislike.

Returns: Promise.<ActionsResponse>

Param Type Description
video_id string Video id

subscribe(channel_id)

Subscribes to given channel.

Returns: Promise.<ActionsResponse>

Param Type Description
channel_id string Channel id

unsubscribe(channel_id)

Unsubscribes from given channel.

Returns: Promise.<ActionsResponse>

Param Type Description
channel_id string Channel id

comment(video_id, text)

Posts a comment on given video.

Returns: Promise.<ActionsResponse>

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.<ActionsResponse>

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.<ActionsResponse>

Param Type Description
channel_id string Channel id
type string PERSONALIZED, ALL or NONE