接口文档.md
4.67 KB
家长服务接口
用户注册
POST https://api.boxfish.cn/signup
参数
Name | Type | Descripton |
---|---|---|
type | String | 必须。自动注册 |
返回值
{
"username": "user161116141854MKyNqTI3",
"status": "success"
}
登录
POST https://api.boxfish.cn/login
参数
Name | Type | Descripton |
---|---|---|
username | String | 必须. |
返回值
成功
{
"access_token": "CxCIFCdSFu",
"id": 70904,
"code": "success"
}
失败
{
"code":"fail",
"msg":"失败具体原因"
}
家长发送学生验证码 POST
POST /parents/family/mobile/invite/15504612470?access_token=admin
返回值: 200 OK
错误时: 400
{
"message": "您已是该手机号对应账号的家长"
}
家长确认绑定
POST /parents/family/mobile/accept/{mobile}/{code}?access_token=admin
Name | Type | Desc |
---|---|---|
mobile | String | 必须.被绑定用户手机号 |
code | String | 必须.短信验证码 |
返回值
成功
http code 200
失败
http code 400
{
"message": "失败具体原因!"
}
家长查询学生
GET /parents/family/students?access_token=admin
返回值
[
{
"stuId": 1,
"parentId": 246825,
"stuName": "盒子鱼",
"parentName": "qqqqqqq",
"stuFigureUrl": null,
"parentFigureUrl":"http://q.qlogo.cn/qqapp/101019284/2A80E4F65BDD755D4181059D9755696B/100",
"createAt": "2016-11-16T16:11:16.311"
}
]
用户首页词义等级信息
GET /parents/{student_Id}/info?access_token=admin
Name | Type | Desc |
---|---|---|
student_id | Long | 必须.学生id |
家长查询学生今日学习接口
GET /parents/learning/{student_id}/{date}?access_token=parent0
Name | Type | Desc |
---|---|---|
student_id | Long | 必须.学生id |
date | String | 必须.时间(2016-11-29) |
返回值
{
"userId": 100000000721,
"listeningTime": 66,
"learningTime": 13735,
"multiwordCount": 1,
"readWordCount": 19,
"lessonCount": 1,
"date": "2016-11-29"
}
家长查询学生周学习时长接口
GET /parents/learning-between/{student_id}/{start_date}/{end_date}?access_token=parent0
Name | Type | Desc |
---|---|---|
student_id | Long | 必须.学生id |
start_date | String | 必须.开始时间(2016-11-25) |
end_date | String | 必须.结束时间(2016-11-29) |
返回值
[
{
"learningTime": 1372,
"date": "2016-11-25"
},{
"learningTime": 6216,
"date": "2016-11-26"
},{
"learningTime": 3106,
"date": "2016-11-27"
}
]
家长查询今日课程学习详情接口
GET /parents/learning/lessons/{student_id}/{date}?access_token=parent0
Name | Type | Desc |
---|---|---|
student_id | Long | 必须.学生id |
date | String | 必须.时间(2016-11-25) |
返回值
[
{
"userId": 100000000721,
"lesson": "L3NoYXJlL3N2bi9MZXZlbCAzX0Z1bmN0aW9uMS8wMjgu5aaC5L2V6K-i6Zeu5LuK5aSp5piv5ZGo5Yeg77yfLnhsc3g",
"listeningTime": 21,
"multiwordCount": 4,
"recordScore": 50,
"readWordCount": 11,
"standard": 92,
"cover": "0736ff76b0fb8968a55a4d9cb393a22c",
"channel": "STUDENT"
},
{
"userId": 100000000721,
"lesson": "L3NoYXJlL3N2bi9MZXZlbCAzX0dyYW1tYXIxLzAwMy7lpoLkvZXmiormsLTmlbDmuIXmpZrvvJ8ueGxzeA",
"listeningTime": 25,
"multiwordCount": 3,
"recordScore": 35,
"readWordCount": 20,
"standard": 84,
"cover": "90b0daa87d372d93d14a5b4bf22f865d",
"channel": "STUDENT"
},
{
"userId": 100000000721,
"lesson": "L3NoYXJlL3N2bi9MZXZlbCA1X0Z1bmN0aW9uMS8yMDIuIOWmguS9leihqOi-vuKAnOWHoOWIhuS5i-WHoOKAne-8ny54bHN4",
"listeningTime": 66,
"multiwordCount": 1,
"recordScore": 136,
"readWordCount": 19,
"standard": 84,
"cover": "762e03932dcbc6a9e90d40771e9f2a66",
"channel": "STUDENT"
}
]
数据库设计
表名:
family_relation : 保存家长和学生关系的表
family_relation_invite : 家长邀请学生加入关系的表
student_lesson_learning : 学生课程学习表
student_day_learning : 学生当日学习表
4. 统计逻辑
在/event/behavoiur/push接口中,添加了学习时长统计;
在/event/statistic/exam/progress & /event/progress/article/progress 接口中,添加了学生今日学习和课程学习的统计.