sdk.AWF_Comments
sdk.api.comments
Comments Module
Constructors
constructor
new AWF_Comments(log
, gql
, auth
, globalChannel
)
Parameters
Name | Type |
---|---|
log | Logging |
gql | Gql |
auth | AWF_Auth |
globalChannel | EventBus |
Defined in
Methods
addComment
addComment(opt
): Promise
<undefined
| AddCommentMutation
>
Create a new comment
Parameters
Name | Type |
---|---|
opt | Object |
opt.comment | Object |
opt.comment.mentions? | string [] |
opt.comment.postID | string |
opt.comment.replyTo? | string |
opt.comment.tags? | string [] |
opt.data | DataProviderInput [] |
Returns
Promise
<undefined
| AddCommentMutation
>
Defined in
editComment
editComment(opt
): Promise
<undefined
| EditCommentMutation
>
Update an existing comment
Parameters
Name | Type |
---|---|
opt | Object |
opt.comment | Object |
opt.comment.mentions? | string [] |
opt.comment.postID | string |
opt.comment.replyTo? | string |
opt.comment.tags? | string [] |
opt.commentID | string |
opt.data | DataProviderInput [] |
Returns
Promise
<undefined
| EditCommentMutation
>
Defined in
getComment
getComment(commentID
): Promise
<GetCommentQuery
>
Get comment data
Parameters
Name | Type |
---|---|
commentID | string |
Returns
Promise
<GetCommentQuery
>
Defined in
getComments
getComments(opt
): Promise
<GetCommentsQuery
>
Get a list of comments for a post
Parameters
Name | Type |
---|---|
opt | Object |
opt.limit | number |
opt.offset? | string |
opt.postID | string |
Returns
Promise
<GetCommentsQuery
>
Defined in
getReplies
getReplies(opt
): Promise
<GetRepliesQuery
>
Get a list of replies for a comment
Parameters
Name | Type |
---|---|
opt | Object |
opt.commentID | string |
opt.limit | number |
opt.offset? | string |
opt.postID | string |
Returns
Promise
<GetRepliesQuery
>
Defined in
removeComment
removeComment(commentID
): Promise
<RemoveCommentMutation
>
Remove a comment's data by ID
Parameters
Name | Type |
---|---|
commentID | string |
Returns
Promise
<RemoveCommentMutation
>