[关闭]
@chengxuyuan 2020-05-12T02:37:50.000000Z 字数 1121 阅读 330

证书文档

社区


我的证书

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/certificate/list_mycertificate/ 我的证书列表 YES

cURL Example

  1. curl -X GET http://127.0.0.1:8000/server/certificate/list_mycertificate/?user_id=367 -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc'

按条件过滤列表释义如下 :
1. user_id 用户 id:
/server/certificate/list_mycertificate/?user_id=1

Response

  1. {
  2. "count": 2,
  3. "next": null,
  4. "previous": null,
  5. "results": [{
  6. "id": 4,
  7. "deleted": false,
  8. "create_time": "2020-05-06T18:20:13.359527",
  9. "order_index": 1000,
  10. "url": "https://static1.bcjiaoyu.com/league_d127aed6ee413146b558313db972a8e7_367.png",
  11. "name": "Python Level 1",
  12. "owner": 367
  13. }]
  14. }

发证书

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
PUT /server/certificate/send_certificate/ 补发联赛证书 YES

cURL Example

  1. curl -X PUT http://127.0.0.1:8000/server/certificate/send_certificate/ -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc' --data '{"username":"15201052252", "category":1}'

Request Parameters

Name Description Required Default
username 用户的账号 YES
category 联赛分类 id YES

Request

  1. {
  2. "category":1
  3. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注