教室的评价
儿童编程
获取成对的教室评价
Method and URL Structure
| Method |
Resource URL |
Authorization |
| GET |
/classroom/classroom_two_evaluations/ |
NO |
Request Parameters
| Name |
Description |
Required |
| student |
学生用户名 |
YES |
cURL Example
curl -X GET -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/classroom_two_evaluations/?student=18012345678
Reponse
{ "count":1, "next":null, "previous":null, "results":[{ "pk":2, "name":"三年级(9)班", "types":"onetoone", "status":"finish", "scores": 0, "student_evaluation":{ "pk":4, "owner":null, "evaluation_type":"teacher", "scores":5, "scores_display":"五星", "image":"http://www.example.com/1.png", "content":"评价内容", "create_time":"2018-01-04T16:35:08.255734", "record":null }, "teacher_evaluation":{ "pk":3, "evaluation_type":"student", "scores":5, "scores_display":"五星", "image":"http://www.example.com/1.png", "content":"评价内容", "create_time":"2018-01-04T16:35:08.176043", "record":null } }...]}
对上完课程的教室评分
Method and URL Structure
| Method |
Resource URL |
Authorization |
| POST |
/classroom/score/${pk}/ |
NO |
Request Parameters
| Name |
Description |
Required |
| scores |
分数: 1 ~ 5 分 |
YES |
Request Data
{ "scores": 5}
cURL Example
curl -X POST -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/score/123456/
获取老师的评论
Method and URL Structure
| Method |
Resource URL |
Authorization |
| GET |
/classroom/evaluations/ |
NO |
Request Parameters
| Name |
Description |
Required |
| teacher |
老师用户名 |
YES |
| all |
所有 |
YES |
cURL Example
curl -X GET -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/evaluations/?teacher=18012345678
Reponse
{ "count":1, "previous":null, "next":null, "results":[{ "scores_display":"五星", "evaluation_type":"student", "content":"评价内容", "record":null, "create_time":"2018-03-21T15:57:40.917837", "scores":5, "owner":{ "name":"赵小明", "avatar":"http://www.example.com/xiaoming.jpg" }, "pk":1,"image":"http://www.example.com/1.png" }..]}