Skip to main content

sdk.AWF_Comments

sdk.api.comments

Comments Module

Constructors

constructor

new AWF_Comments(log, gql, auth, globalChannel)

Parameters

NameType
logLogging
gqlGql
authAWF_Auth
globalChannelEventBus

Defined in

sdk/src/posts/comments.ts:34

Methods

addComment

addComment(opt): Promise<undefined | AddCommentMutation>

Create a new comment

Parameters

NameType
optObject
opt.commentObject
opt.comment.mentions?string[]
opt.comment.postIDstring
opt.comment.replyTo?string
opt.comment.tags?string[]
opt.dataDataProviderInput[]

Returns

Promise<undefined | AddCommentMutation>

Defined in

sdk/src/posts/comments.ts:92


editComment

editComment(opt): Promise<undefined | EditCommentMutation>

Update an existing comment

Parameters

NameType
optObject
opt.commentObject
opt.comment.mentions?string[]
opt.comment.postIDstring
opt.comment.replyTo?string
opt.comment.tags?string[]
opt.commentIDstring
opt.dataDataProviderInput[]

Returns

Promise<undefined | EditCommentMutation>

Defined in

sdk/src/posts/comments.ts:135


getComment

getComment(commentID): Promise<GetCommentQuery>

Get comment data

Parameters

NameType
commentIDstring

Returns

Promise<GetCommentQuery>

Defined in

sdk/src/posts/comments.ts:49


getComments

getComments(opt): Promise<GetCommentsQuery>

Get a list of comments for a post

Parameters

NameType
optObject
opt.limitnumber
opt.offset?string
opt.postIDstring

Returns

Promise<GetCommentsQuery>

Defined in

sdk/src/posts/comments.ts:57


getReplies

getReplies(opt): Promise<GetRepliesQuery>

Get a list of replies for a comment

Parameters

NameType
optObject
opt.commentIDstring
opt.limitnumber
opt.offset?string
opt.postIDstring

Returns

Promise<GetRepliesQuery>

Defined in

sdk/src/posts/comments.ts:67


removeComment

removeComment(commentID): Promise<RemoveCommentMutation>

Remove a comment's data by ID

Parameters

NameType
commentIDstring

Returns

Promise<RemoveCommentMutation>

Defined in

sdk/src/posts/comments.ts:180