Files
YouTube.js/docs/API/interaction-manager.md
LuanRT eb72c2f6ef refactor(parser): improve typings and do some refactoring (#305)
* 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
2023-02-12 07:04: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