taigaio/taiga-back — pull request #44 by ikame (2014-06-02 10:23:28+00:00)
Title: Generic voting application

The stars application has been removed in favor of a more generic voting
application that works with any model. Starring a project is just a
special case of voting a project.

### Usage

Add a vote:

votes.add_vote(, user)

Remove a vote:

votes.remove_vote(, user)

Get the queryset of users that voted an object:

votes.get_voters()

Get the number of votes an object has:

votes.get_votes()

Get the objects of type voted by an user:

votes.get_voted(user, )

### Issues
The issues application is already making use of the votes application
through the following urls:

#### Up-vote issue
Url name is **issues-upvote**.

POST /api/v1/issues//upvote

#### Down-vote issue
Url name is **issues-downvote**.

POST /api/v1/issues//downvote

### Issue votes count
The number of votes an issue has is returned as the field **votes** in the issue listing and detail endpoints.