2019-11-27 20:55:59 +01:00
|
|
|
# API example
|
|
|
|
after having setup your project and database, and having a local server running you can rest these commands
|
|
|
|
```
|
|
|
|
POST
|
|
|
|
http://127.0.0.1:8000/api/v1/poll/98/vote
|
|
|
|
Content-Type:"pplication/json
|
|
|
|
|
|
|
|
{
|
|
|
|
"pseudo": "Mario Bros",
|
|
|
|
"email": "MarioBros@tktest.com",
|
|
|
|
"votes": [{
|
2019-11-28 11:56:06 +01:00
|
|
|
"choice_id": 5,
|
2019-11-27 20:55:59 +01:00
|
|
|
"value": "yes"
|
|
|
|
},
|
|
|
|
{
|
2019-11-28 11:56:06 +01:00
|
|
|
"choice_id": 6,
|
2019-11-27 20:55:59 +01:00
|
|
|
"value": "no"
|
|
|
|
},
|
|
|
|
{
|
2019-11-28 11:56:06 +01:00
|
|
|
"choice_id": 7,
|
2019-11-27 20:55:59 +01:00
|
|
|
"value": "maybe"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-11-28 11:56:06 +01:00
|
|
|
|
2019-11-27 20:55:59 +01:00
|
|
|
```
|