Skip to main content

Documentation

OAuth.OAuthComments

Constructors

constructor

new OAuthComments(oauth)

Parameters

NameType
oauthOAuth

Defined in

oauth/comments.ts:10

Properties

oauth

oauth: OAuth

Defined in

oauth/comments.ts:10

Methods

deleteComment

deleteComment(commentId): Promise<void>

Deletes a Comment.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameType
commentIdstring

Returns

Promise<void>

Defined in

oauth/comments.ts:131


editComment

editComment(commentId, text): Promise<Comment>

Edit a Comment on a Video or Channel discussion.
Last tested 07/05/2021 17:40. PASSING

Parameters

NameTypeDescription
commentIdstringThe ID of the comment.
textstringThe new text content of the comment.

Returns

Promise<Comment>

Defined in

oauth/comments.ts:67


markCommentAsSpam

markCommentAsSpam(commentId): Promise<void>

Marks a Comment as spam.
Last tested NEVER

Parameters

NameTypeDescription
commentIdstringThe ID of the comment to mark as spam.

Returns

Promise<void>

Defined in

oauth/comments.ts:89


postComment

postComment(text, channelResolvable, videoResolvable): Promise<Comment>

Post a Comment on a Video or Channel discussion.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
textstringThe text content of the comment.
channelResolvableChannelResolvableThe channel to post the comment on.
videoResolvableVideoResolvableThe video of the channel to post the comment on. If falsey, the comment will be posted to the channel discussion.

Returns

Promise<Comment>

Defined in

oauth/comments.ts:20


replyToComment

replyToComment(commentId, text): Promise<Comment>

Replies to a Comment.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
commentIdstringThe ID of the comment to reply to.
textstringThe text to reply with. Required for Comment.url to be correct.

Returns

Promise<Comment>

Defined in

oauth/comments.ts:47


setCommentModerationStatus

setCommentModerationStatus(commentId, moderationStatus, banAuthor?): Promise<void>

Sets the moderation status of a Comment
Last tested NEVER

Parameters

NameTypeDescription
commentIdstringThe ID of the comment to set the moderation status of.
moderationStatus"rejected" | "heldForReview" | "published"The moderation status to set the comment to.
banAuthor?booleanWhether or not to ban the author from making future comments.

Returns

Promise<void>

Defined in

oauth/comments.ts:104