-
Notifications
You must be signed in to change notification settings - Fork 1
Option API
Anton Alexeev edited this page Mar 29, 2018
·
4 revisions
Get List of opiton
Query params for list filtering:
id : integer
poll_id : integer
position : integer
title : string
{
"current_page":1,
"data":[
{
"id":1,
"poll_id":1,
"title": "Messi",
"position": 1,
"votesCount":0,
"totalWeight":0
},...
],
"first_page_url":"http:\/\/localhost\/option?page=1",
"from":1,
"last_page":1,
"last_page_url":"http:\/\/localhost\/option?page=1",
"next_page_url":null,
"path":"http:\/\/localhost\/option",
"per_page":50,
"prev_page_url":null,
"to":2,
"total":2
}
Make a option
poll_id: integer
title*: string
position: integer
field with * are required
{
id:1,
poll_id: 1
title:"Messi",
position:1
}
Get option
{
"id":1,
"poll_id": 1
"title": "Messi",
"position":1,
"votesCount":0,
"totalWeight":0
}
Update a option
poll_id: integer
title*: string
position: integer
field with * are required
{
id:1,
poll_id: 1
title:"Ronaldo",
position:1
}
Delete a option
{"success":true}