1.7 KiB
CommentThread
A CommentThread represents a top-level comment and its replies.
API
- CommentThread
- .comment ⇒
Comment | CommentView - .replies ⇒
(Comment | CommentView)[] - .getReplies ⇒
function - .getContinuation ⇒
function - .has_continuation ⇒
boolean - .has_replies ⇒
boolean
- .comment ⇒
comment
The top-level comment. Note: More about the Comment node here (OUTDATED! Comment has been replaced by CommentView nodes).
Type: Comment
replies
An array of replies to the top-level comment. (not populated until getReplies() is called).
Type: (Comment | CommentView)[]
getReplies()
Retrieves replies to the top-level comment and attaches a replies array to the original CommentThread object and returns it.
Returns: Promise.<CommentThread>
getContinuation()
Retrieves next batch of replies and adds them to the replies array. Note: getReplies() must be called before using this.
Returns: Promise.<CommentThread>
has_continuation
Whether there are more replies to be retrieved.
Type: boolean
has_replies
Whether there are replies to the top-level comment.
Type: boolean