[关闭]
@chengxuyuan 2020-05-07T07:18:24.000000Z 字数 2733 阅读 303

视频课程文档

橙旭园服务器


视频课程分类列表

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/course/video/category/ 列表 YES

按条件过滤列表释义如下 :
1. is_oj(是否展示到oj社区) 示例: /server/course/video/category/?is_oj=true
2. is_community(是否展示在社区)示例:
/server/course/video/category/?is_community=true

cURL Example

  1. curl -X GET http://127.0.0.1:8000/server/course/video/category/

Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 1,
  8. "name": "11",
  9. "top_3_videos": [
  10. {
  11. "id": 36,
  12. "pk": 36,
  13. "deleted": false,
  14. "create_time": "2020-04-30T16:06:34.805429",
  15. "order_index": 1000,
  16. "title": "哈哈哈哈哈哈",
  17. "video": "https://static1.bcjiaoyu.com/scinenceclub/3/video/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-%E7%AC%AC18%E8%AF%BE.mp4",
  18. "duration": null,
  19. "banner": "https://static1.bcjiaoyu.com/scinenceclub/3/coverpic/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-18.png",
  20. "work_link": null,
  21. "browser_count": 0,
  22. "course": null,
  23. "category": 1
  24. }
  25. ],
  26. "icon": null
  27. }
  28. ]
  29. }

视频课程列表

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/course/video/category/ 列表 YES

按条件过滤列表释义如下 :
1. category(视频课程分类的 pk 或 id) 示例: /server/course/videos/?category=1
2. page(第几页)示例:
/server/course/videos/?page=1
3. page_size(一页几条)示例:
/server/course/videos/?page_size=10

cURL Example

  1. curl -X GET http://127.0.0.1:8000/server/course/videos/

Response Parameters

Name Description
title 名称
video 视频链接
banner banner 图
work_link 作品链接
browser_count 浏览量
category 视频课程分类的 pk/id
create_time 新建时间

Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "id": 36,
  8. "pk": 36,
  9. "deleted": false,
  10. "create_time": "2020-04-30T16:06:34.805429",
  11. "order_index": 1000,
  12. "title": "哈哈哈哈哈哈",
  13. "video": "https://static1.bcjiaoyu.com/scinenceclub/3/video/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-%E7%AC%AC18%E8%AF%BE.mp4",
  14. "duration": null,
  15. "banner": "https://static1.bcjiaoyu.com/scinenceclub/3/coverpic/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-18.png",
  16. "work_link": null,
  17. "browser_count": 0,
  18. "course": null,
  19. "category": 1
  20. }
  21. ]
  22. }

视频课程详情

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/course/videos/${pk}/ 详情 YES

cURL Example

  1. curl -X GET http://127.0.0.1:8000/server/course/videos/36/

Response

  1. {
  2. "id": 36,
  3. "pk": 36,
  4. "deleted": false,
  5. "create_time": "2020-04-30T16:06:34.805429",
  6. "order_index": 1000,
  7. "title": "哈哈哈哈哈哈",
  8. "video": "https://static1.bcjiaoyu.com/scinenceclub/3/video/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-%E7%AC%AC18%E8%AF%BE.mp4",
  9. "duration": null,
  10. "banner": "https://static1.bcjiaoyu.com/scinenceclub/3/coverpic/%E9%9D%92%E5%B0%91%E5%84%BF%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%8E%9F%E7%90%86%E8%AF%BE-18.png",
  11. "work_link": null,
  12. "browser_count": 2,
  13. "course": null,
  14. "category": 1
  15. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注