Skip to content

Hippo/poll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poll

A restful server to make voting polls.

Integrated with MongoDB.

API

Create a poll

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)

Getting a poll

GET /api/{id}

Voting

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.

About

A restful server to make voting polls.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages