[关闭]
@fuyb1986 2018-04-18T08:13:48.000000Z 字数 1040 阅读 517

签发学习证书

儿童编程


可用证书列表

Method and URL Structure

Method Resource URL Authorization
GET /program_face2face/userinfo/certificate/ YES

Request Parameters

Name Description Default Required
page 分页 1 False

cURL Example

  1. curl -X GET -H 'Content-Type: application/json' http://localhost/program_face2face/userinfo/certificate/

Response Data

Name Description
name 名字
display 中文名

Response

  1. [
  2. {
  3. "name": "primary_scratch",
  4. "display": "Scratch初级证书"
  5. },
  6. {
  7. "name": "intermediate_scratch",
  8. "display": "Scratch中级证书"
  9. },
  10. ...
  11. ]

签发证书

Method and URL Structure

Method Resource URL Authorization
POST /program_face2face/userinfo/certificate/generate/ YES

Request Data

Name Description Required
name 证书名称 YES
student_name 学生姓名 YES
username 用户名 YES
content 内容: 可以为空 YES

Request

  1. {
  2. "name": "primary_scratch",
  3. "student_naem": "小丽",
  4. "username": "12345678910",
  5. "content": ""
  6. }

cURL Example

  1. curl -X POST -H 'Content-Type: application/json' http://localhost/server/userinfo/certificate/

Response

  1. {
  2. "pk": 157,
  3. "name": "primary_scratch",
  4. "username": "123345678910",
  5. "student_name": "小丽",
  6. "images": null,
  7. "content": "",
  8. "image_url": "/program_face2face/media/certificates/18516271264/primary_scratch.png"
  9. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注