A restful server to make voting polls.
Integrated with MongoDB.
POST /api
The body of the request would need to look something like this
{
"question": "Does pineapple belong on pizza?",
"answers": [
{"label": "yes"},
{"label": "no"}
]
}
This will return a pollId
(integer)
GET /api/{id}
POST /api/vote
The body of the request would need to look something like this
{
"pollId": 0,
"answerId": 1
}
The answerId
in the index of the answer choice in the poll.