Vote polls
请用 (https://yedoll.com/mobile_api/vote_polls) API endpoint for polls voting
Post 参数
参数 | 值 | 描述 |
---|---|---|
session_id | Access token ID | 例如: de25cc16eb00960f076... |
post_id | Post int ID | 例如: 84 |
poll_id | Poll index ID (starts from 0,1,2,3 etc..) | 例如: To vote frist option of a poll send 0 |
成功响应
{
"code": 200,
"message": "Poll voted successfully",
"data":{
"poll_data":{
"has_voted": 1,
"total": 1,
"options":[
{
"percentage": "0",
"total": 0,
"option": "option 1"
},
{
"percentage": "100",
"total": 1,
"option": "option 2"
},
{
"percentage": "0",
"total": 0,
"option": "option 2"
}
]
}
}
}
错误响应
{
"code": 400,
"message": "An error occurred while processing your request",
"data": []
}
{
"code": 400,
"message": "Post id is missing or invalid",
"data": []
}