Appearance
弹题排行榜
GET
/api/app/course/{courseId}/task/{taskId}/marker/{markerId}/ranking
返回弹题排行榜,包括我的排名和 TOP20。
- myEntry:当前轮成绩 + 排名
- topList:所有学员最佳轮成绩排名(TOP20)
位置参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| courseId | number | 是 | 课程 ID |
| taskId | number | 是 | 任务 ID |
| markerId | number | 是 | 弹题 ID |
响应
| 字段 | 类型 | 说明 |
|---|---|---|
| myEntry | object / null | 我的排名信息(当前轮);无成绩时为 null |
| myEntry.rank | number | 我的排名;同分同名次 |
| myEntry.nickname | string | 昵称 |
| myEntry.avatar | string | 头像 URL(已转换) |
| myEntry.score | number | 我的当前轮总分 |
| topList | array | TOP 榜单,默认 20 条(最佳轮成绩) |
| topList[].rank | number | 名次;同分同名次 |
| topList[].nickname | string | 昵称 |
| topList[].avatar | string | 头像 URL(已转换) |
| topList[].score | number | 该用户最佳轮总分 |
| topList[].isCurrentUser | boolean | 是否为当前用户 |
响应示例
json
{
"myEntry": {
"rank": 2,
"nickname": "Aiden",
"avatar": "https://cdn.example.com/avatar1.png",
"score": 3200
},
"topList": [
{
"rank": 1,
"nickname": "Aiden",
"avatar": "https://cdn.example.com/avatar1.png",
"score": 3600,
"isCurrentUser": true
}
]
}异常
| 错误码 | HTTP | 说明 |
|---|---|---|
COURSE_VIDEO_MARKER_TASK_MISMATCH | 400 | 任务与弹题不匹配 |
COURSE_VIDEO_MARKER_NOT_FOUND | 404 | 弹题不存在 |