直播教室-点名记录-文档
橙旭园服务器
点名记录列表
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
GET |
/server/classroom/list_rollcall/ |
列表 |
YES |
按条件过滤列表释义如下 :
1. classroom_id
(直播教室的 pk) 示例: /server/classroom/list_rollcall/?classroom_id=1
2. user_id
(用户 id)示例:
/server/classroom/list_rollcall/?user_id=1
3. course_id
(课程 id)示例:
/server/classroom/list_rollcall/?course_id=1
cURL Example
curl -X GET http://127.0.0.1:8000/server/classroom/list_rollcall/ -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc'
Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"owner": {
"name": "勿问情殇_1111_23",
"avatar": "https://static1.bcjiaoyu.com/bcgame_face2face/15201052252/5690023e83a72af4ff5be0badaadfbe4_k.gif-658x658",
"user": "15201052252",
"nickname": "chen",
"realname": "陈微",
"user_id": 367,
"is_staff": false,
"segment": {
"name": "黄金",
"image": "https://static1.bcjiaoyu.com/community/touxiangkuang/king.png"
},
"job_title": "讲师"
},
"classroom": 215,
"pk": 2,
"course_rollcall_count": 2,
"deleted": false,
"create_time": "2020-08-17T16:11:58.257899",
"order_index": 1000,
"audio": null
}
]
}
新建直播教室点名记录
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
POST |
/server/classroom/create_rollcall/ |
新建 |
YES |
cURL Example
curl -X POST http://127.0.0.1:8000/server/classroom/create_rollcall/ -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc' --data '{"username":"15201052252", "classroom_id":1}'
Request Parameters
Name |
Description |
Required |
Default |
username |
用户的账号 |
NO |
|
user_id |
用户id |
NO |
|
classroom_id |
直播教室 id |
YES |
|
audio |
音频地址 |
NO |
|
action |
用户的行为 |
YES |
chat/close/audio |
Request
{
"classroom_id":1,
"action":'audio',
"audio":"https://12.mp3"
}
Response
{
"id": 2,
"owner": {
"name": "勿问情殇_1111_23",
"avatar": "https://static1.bcjiaoyu.com/bcgame_face2face/15201052252/5690023e83a72af4ff5be0badaadfbe4_k.gif-658x658",
"user": "15201052252",
"nickname": "chen",
"realname": "陈微",
"user_id": 367,
"is_staff": false,
"segment": {
"name": "黄金",
"image": "https://static1.bcjiaoyu.com/community/touxiangkuang/king.png"
},
"job_title": "讲师"
},
"classroom": 215,
"pk": 2,
"course_rollcall_count": 2,
"deleted": false,
"create_time": "2020-08-17T16:11:58.257899",
"order_index": 1000,
"audio": null
}
教室已到用户的点名数据
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
GET |
/server/classroom/attendance_user_rollcall/ |
列表 |
YES |
按条件过滤列表释义如下 :
1. classroom_id
(直播教室的 pk) 示例: /server/classroom/attendance_user_rollcall/?classroom_id=38
cURL Example
curl -X GET http://127.0.0.1:8000/server/classroom/attendance_user_rollcall/?classroom_id=38 -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc'
Response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"pk": 1,
"username": "15201052252",
"classroom_rollcall": {
"action": "chat",
"action_display": "聊天区回答",
"audio": ""
},
"course_rollcall_count": 4
}
]
}