Namespace: comments

comments

Source:

Namespaces

votes

Methods

(static) create(options, done)

Create a new comment

Parameters:
Name Type Description
options Object options
Properties
Name Type Attributes Description
body Number The text of the comment you want to save. Allowed html tags are: `br strong b em i img a`
post_id Number <optional>
The id the post the comment belongs to (passed via URL)
live_event_id Number <optional>
The id the LIVE event the comment belongs to (passed via URL)
parent_comment_id Number <optional>
The id of the parent comment if this is a nested reply
done done Callback
Source:
See:

(static) index(options, done)

Fetch a stream of all recent comments

Parameters:
Name Type Description
options Object options
Properties
Name Type Attributes Description
user_id Number <optional>
Provide if you want to fetch comments of a user (not nested)
post_id Number <optional>
Provide if you want to fetch all threads of a post (nested and sorted))
live_event_id Number <optional>
Provide if you want to fetch all threads of a live event (nested and sorted)
params.older Number <optional>
Filter parameter: get only records older than the provided id
params.newer Number <optional>
Filter parameter: get only records newer than the provided id
params.per_page Number <optional>
Filter parameter: define the amount of records sent per call (max 50)
params.order String <optional>
Filter parameter: define the order you want to receive the records (does not affect older/newer behaviour). Valid values are asc or desc.
params.search.user_id Boolean <optional>
The id of a user you want to filter for. If you pass this id the user won't be nested.
params.search.post_id String <optional>
The id of a post you want to filter for. If you pass this id the post won't be nested.
params.search.ama_event_id String <optional>
The id of a post you want to filter for. If you pass this id the ama_event won't be nested.
done done Callback
Source:
See:

(static) update(options, done)

Update a comment

Parameters:
Name Type Description
options Object options
Properties
Name Type Attributes Description
body Number The text of the comment you want to save. Allowed html tags are: `br strong b em i img a`
parent_comment_id Number <optional>
The id of the parent comment if this is a nested reply
done done Callback
Source:
See: