Skip to content
Henry Smith edited this page Sep 4, 2011 · 3 revisions

Official documentation

Reference

Methods that require a valid login

vote($direction)

Casts a vote on the comment: 1 for an upvote, -1 for down, and 0 to remove votes

reply($text)

Posts a reply to the comment

save()

Saves the comment

unsave()

Unsaves the comment

hide()

Hides the comment

unhide()

Unhides the comment

Methods that do not require a login

countReplies()

Returns the number of replies to the comment

getUpvotes()

Returns the number of upvotes given to the comment

getDownvotes()

Returns the number of downvotes given to the comment

getBody()

Returns the comment's body (plain text, not HTML formatted)

getAuthorName()

Returns the username of the user who posted the comment

getReplies()

Returns an array of replies to the comment

getParent()

Returns the comment's parent comment, if one exists

getThingId()

Returns the comment's unique 't1_*' style ID For example 't1_qwerty'

getId()

Returns the comment's ID

Clone this wiki locally