投票
请使用此 (https://mariago.site/mobile_api/vote_polls) API端点进行投票
POST参数
字段 | 值 | 说明 |
---|---|---|
session_id | 访问令牌ID | 例如: de25cc16eb00960f076... |
post_id | 帖子整数ID | 例如: 84 |
poll_id | 投票选项索引ID(从0,1,2,3等开始) | 例如: 要投票给第一个选项,请发送 0 |
成功响应
{
"code": 200,
"message": "投票成功",
"data":{
"poll_data":{
"has_voted": 1,
"total": 1,
"options":[
{
"percentage": "0",
"total": 0,
"option": "选项1"
},
{
"percentage": "100",
"total": 1,
"option": "选项2"
},
{
"percentage": "0",
"total": 0,
"option": "选项2"
}
]
}
}
}
错误响应
{
"code": 400,
"message": "处理请求时发生错误",
"data": []
}
{
"code": 400,
"message": "帖子ID缺失或无效",
"data": []
}