获取投票信息
请求地址
GET /api/live/v1/room/{id}/ballots/{ballotId}
字段 |
是否可选 |
类型 |
描述 |
Authorization |
否 |
string |
认证信息,格式:bearer ${token} |
Accept-Language |
是 |
string |
选择语言,(zh-CN)(zh-TW)(en-US) 默认值: zh-CN |
Content-Type |
是 |
string |
application/x-www-form-urlencoded |
响应参数
字段 |
类型 |
描述 |
resCode |
int |
响应码 |
resMessage |
String |
提示消息(根据language参数,选择语言返回) |
data |
json |
响应数据 |
成功返回
http/1.1 200 OK
{
"resCode": 1,
"resMessage": "success",
"data":{
"id":1,
"title":"这是第一个投票",
"status":1,
"total":12,
"share":true,
"startTime":15465212000,
"endTime":182165321000,
"questions":[
{
"name":"你喜欢的课程是?",
"type":"RADIO_SELECT",
"maxChoice":1,
"must":true,
"options":["语文","数学","英语"]
},
{
"name":"你喜欢的老师是?",
"type":"MULTI_SELECT",
"maxChoice":2,
"must":true,
"options":["张三","李四","王五","赵六"]
}
],
"result":[[10,20,0],[20,20,0,0]]
}
}
失败返回
http/1.1 200 OK
{
"resCode": -1,
"resMessage": "xxx"
}