获取投票列表
请求地址
GET /api/live/v1/room/{id}/ballots
header
字段 | 是否可选 | 类型 | 描述 |
---|---|---|---|
Authorization | 否 | string | 认证信息,格式:bearer ${token} |
Accept-Language | 是 | string | 选择语言,(zh-CN)(zh-TW)(en-US) 默认值: zh-CN |
Content-Type | 是 | string | application/x-www-form-urlencoded |
请求参数
字段 | 是否可选 | 类型 | 描述 |
---|---|---|---|
liveNo | 是 | String | 直播流水号 |
statusStr | 是 | string | 投票状态列表,用逗号分隔 |
curPage | 是 | int | 当前页码 默认值:1 |
pageSize | 是 | int | 页面大小 默认值:15 |
响应参数
字段 | 类型 | 描述 |
---|---|---|
resCode | int | 响应码 |
resMessage | String | 提示消息(根据language参数,选择语言返回) |
data | json | 响应数据 |
成功返回
http/1.1 200 OK
{
"resCode": 1,
"resMessage": "success",
"data":{
"total":11,
"rows":[
{
"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]]
},{
"id":2,
"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"
}