签发学习证书
儿童编程
可用证书列表
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
curl -X GET -H 'Content-Type: application/json' http://localhost/program_face2face/userinfo/certificate/
Response Data
Name |
Description |
name |
名字 |
display |
中文名 |
Response
[
{
"name": "primary_scratch",
"display": "Scratch初级证书"
},
{
"name": "intermediate_scratch",
"display": "Scratch中级证书"
},
...
]
签发证书
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
{
"name": "primary_scratch",
"student_naem": "小丽",
"username": "12345678910",
"content": ""
}
cURL Example
curl -X POST -H 'Content-Type: application/json' http://localhost/server/userinfo/certificate/
Response
{
"pk": 157,
"name": "primary_scratch",
"username": "123345678910",
"student_name": "小丽",
"images": null,
"content": "",
"image_url": "/program_face2face/media/certificates/18516271264/primary_scratch.png"
}