Namespace: votes

votes

Source:

Methods

(static) create(options, post_id, done)

Vote for a post

Parameters:
Name Type Description
options Object options
post_id Number The ID of the post you want to vote for
done done Callback
Source:
See:

(static) destroy(options, post_id, done)

Unvote a post

Parameters:
Name Type Description
options Object options
post_id Number The ID of the post you want to un-vote
done done Callback
Source:
See:

(static) index(options, done)

See all votes for a post

Parameters:
Name Type Description
options Object options
Properties
Name Type Attributes Description
post_id Number <optional>
The ID of the post (You must provide either post_id or user_id)
user_id Number <optional>
The ID of the user (You must provide either post_id or user_id)
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.
done done Callback
Source:
See: