直播课程
橙旭园儿童编程
获取所有直播课程列表
Method and URL Structure
| Method |
Resource URL |
| GET |
live_course/livecourse_list |
cURL Example
curl -X GET -H 'Content-Type: application/json' http://localhost/server/live_course/livecourse_list
Request Parameters
| name |
description |
Required |
| category |
0:编程思维 1:编程创作 2:计算思维 3:开发思维 4:公开课 5:公益课 |
No |
| wx |
显示在服务号的:True, False |
NO |
Response Data
| name |
description |
| course_name |
课程名称 |
| category |
课程阶段分类 |
| class_time |
开课时间 |
| time_limit |
上课期限 |
| teacher |
主讲老师姓名 |
| teacher_Avatar |
主讲老师头像 |
| class_teacher |
班主任姓名 |
| class_teacher_avatar |
班主任头像 |
| class_number |
课时数 |
| amount |
金额 |
| current_time |
当前时间 |
| apple_product_id |
苹果id |
| apple_product_amount |
苹果金额 |
| cover_url |
封面url |
Response
{ "count": 1, "next": null, "previous": null, "results": [ { "pk": 2, "course_name": "编程思维", "category_display": "编程思维", "class_time": "2019-02-13 19:00", "time_limit": "2019-07-10 19:00", "teacher": "刘彧彤", "teacher_Avatar": "https://static1.bcjiaoyu.com/Femaleteacher.png", "class_teacher": "马瑞", "amount": "3999.00", "add_time": "2018-12-27 16:32", "class_teacher_avatar": "https://static1.bcjiaoyu.com/Femaleteacher.png", "class_number": 45, "apple_product_id": "liveclass0101", "apple_product_amount": "3998.00", "current_time": "2019-01-02 11:40:00.766937", "cover_url": "https://resource.bcgame.haorenao.cn/001Course.png" } ]}
获取单个课程详情
Method and URL Structure
| Method |
Resource URL |
Authorization |
| GET |
live_course/livecourse_detail/${pk}/ |
No |
cURL Example
curl -X GET -H 'Content-Type: application/json' http://localhost/server/live_course/livecourse_detail/1
Response
{ "course_name": "编程思维", "category": 0, "class_time": "2018-12-29T11:51:00", "time_limit": "2019-02-09T11:51:00", "teacher": null, "teacher_Avatar": null, "class_teacher": null, "class_teacher_avatar": null, "class_number": 0, "amount": 100, "add_time": "2018-12-22 11:50", "current_time": "2018-12-23 13:00"}
获取我的直播课程
Method and URL Structure
| Method |
Resource URL |
Authorization |
| GET |
live_course/my_livecourse/ |
yes |
cURL Example
curl -X GET -H 'Authorization: Token admin123' http://localhost/server/live_course/my_livecourse
Response Data
| name |
description |
| course_name |
课程名称 |
| category |
课程阶段分类 |
| cover_url |
购买后的封面 |
| grey_cover_url |
未购买封面 |
| bought |
是否购买(公开课和公益课默认购买) |
| class_time |
上课时间 |
Response
{ "count": 5, "next": null, "previous": null, "results": [ { "pk": 7, "course_name": "公益课", "category": 5, "category_display": "公益课", "cover_url": "https://static1.bcjiaoyu.com/welfare.png", "grey_cover_url": "https://static1.bcjiaoyu.com/welfare.png", "bought": true, "class_time": "2019-01-05T11:34:00" } ]}
直播课程购买
| Method |
Resource URL |
Authorization |
| POST |
market/live_course/purchase/(?P\d+)/ |
yes |
cURL Example
curl -X GET -H 'Authorization: Token admin123' http://localhost/server/market/live_course/purchase/1/
Response
{ "amount": "100.00", "rent_course_id": "1", "channel": "alipay", "order_number": "12345899002574742736220002", "channel_display": "支付宝", "status": 0, "status_display": "待付款", "is_done": false, "order_type_display": "租凭"}