Skip to content
thirdcreed edited this page Jan 3, 2015 · 6 revisions

##Election

POST /election/:election

Adds an election specified at :election ###GET /election/:election/score/:rule Scores an election according to :rule Response

{
    rank: {
        "a": 1,
        "b": 2,
        "c": 3,
        "d": 4
     },
    additionalInfo: {
        ...
    }
 }

POST /election/:election/user/:user/vote

Add a vote for to an election :election user :user

Request

["a","b","c"]

POST /election/:election/alternatives

Add the names of the alternatives for an election

Request ["a","b","c"] ##User ###POST /user/:user Adds a user

Request

{
    name:name,
    groups:[],
    otherStuff:{}
}

DELETE /user/:user

PUT /user/:user

GET /user/:user