@sewise-dev
2018-07-27T08:42:58.000000Z
字数 14600
阅读 687
微录播
编号 | 版本 | 说明 | 作者 | 日期 |
---|---|---|---|---|
1 | v2.0 | 2.0.完善文档 | jacky | 2017-1-16 |
/statistics/share
application/json
GET
参数 必选 类型 说明 swlid string 课程swlid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
result | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
share | array | 分享情况 |
study | Array | 学习情况 |
answer | Array | 问答情况 |
point | Array | 知识点情况 |
list | Array | 学生学习情况 |
share
返回字段 | 字段类型 | 说明 |
---|---|---|
total | int | 学生总数 |
finished | int | 完成总数 |
studying | int | 学习中 |
notstart | int | 未开始 |
study
返回字段 | 字段类型 | 说明 |
---|---|---|
ave_spend_time | int | 平均耗时 |
max_spend_time | int | 最长耗时 |
mix_spend_time | int | 最短耗时 |
answer
返回字段 | 字段类型 | 说明 |
---|---|---|
correct_rate | int | 答对率 |
correct_num | int | 被全部学生答对问题总数 |
point
返回字段 | 字段类型 | 说明 |
---|---|---|
point_grasp_rate | int | 知识点掌握度 |
grasp_num | int | 被全部学生掌握知识点总数 |
list
返回字段 | 字段类型 | 说明 |
---|---|---|
uid | int | 用户id |
name | string | 姓名 |
process | int | 学习进度 |
total_spendtime | int | 学习耗时 |
finish_time | int | 完成时间 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/statistics/list
Response
{"result":{"share":{"total":3,"finished":0,"studying":0,"notstart":0},"study":{"ave_spend_time":623080,"max_spend_time":890080,"mix_spend_time":89080},"point":{"point_grasp_rate":"0.53","grasp_num":0},"answer":{"correct_rate":"0.40","correct_num":0},"list":[{"uid":"5112","name":"张老师","process":"0.04","total_spendtime":890080,"finish_time":"149009209909"},{"uid":"5110","name":"张老师","process":"0.04","total_spendtime":890080,"finish_time":"149009209909"},{"uid":"5111","name":"张老师","process":"0.04","total_spendtime":89080,"finish_time":"149009209909"}]}}
/statistics/user/:swlid/:uid
application/json
GET
参数 必选 类型 说明 swlid string 微课swlid uid string 用户uid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
study | Array | 学习情况 |
answer | Array | 问答情况 |
point | Array | 知识点情况 |
study
返回字段 | 字段类型 | 说明 |
---|---|---|
precent | int | 进度百分比 |
spend_time | int | 耗时 |
answer
返回字段 | 字段类型 | 说明 |
---|---|---|
precent | int | 进度百分比 |
total | int | 问题总数 |
correct | int | 答对总数 |
wrong | int | 答错总数 |
point
返回字段 | 字段类型 | 说明 |
---|---|---|
precent | int | 进度百分比 |
total | int | 问题总数 |
grasp | int | 掌握总数 |
disgrasp | int | 未掌握总数 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/statistics/user
Response
{"result":{"study":{"precent":"0.04","spend_time":"3600"},"answer":{"precent":"0.40","total":"10","correct":"4","wrong":29},"point":{"precent":"0.60","total":"5","grasp":"3","disgrasp":2}}}
/statistics/:swlid/:uid
application/json
GET
参数 必选 类型 说明 swlid string 微课swlid uid string 用户uid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
precent | array | 百分比 |
list | array | 学习统计数据 |
list(学习统计数据)
返回字段 | 字段类型 | 说明 |
---|---|---|
create_time | string | 开始时间 |
data | array | 节点学习进度 |
precent | string | 学习百份比 |
data(节点学习进度)
返回字段 | 字段类型 | 说明 |
---|---|---|
study_time | string | 学习耗时 |
correct_precent | string | 答对率 |
point_precent | string | 掌握度 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/user/study
Response
{"result":{"share":["0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"],"list":[[{"id":"fc3ef100-dc95-11e6-b872-dd7574160f84","precent":"0.2","create_time":"1484644742173","round":1,"data":{"correct_precent":"0.40","point_precent":"0.60","study_time":60}},{"id":"347903d0-dc96-11e6-9ea6-f192bce90860","precent":"0.4","create_time":"1484644836497","round":1,"data":{"correct_precent":"0.40","point_precent":"0.60","study_time":"120"}},{"id":"74406080-dc96-11e6-b605-ef0a6ba51af0","precent":"0.4","create_time":"1484644943508","round":1,"data":{"correct_precent":"0.40","point_precent":"0.60","study_time":"180"}}]]}}
/statistics/user/answer/:swlid/:uid
application/json
GET
参数 必选 类型 说明 swlid string 微课swlid uid string 用户uid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
wrong_data | array | 未答对题详情 |
wrong_list | array | 未答对的题 |
wrong_data
返回字段 | 字段类型 | 说明 |
---|---|---|
question_id | int | 问题id |
title | string | 问题标题 |
answers | array | 问题选项 |
correct | array | 正确答案选项 |
user_answer | string | 用户回答选项 |
answers
返回字段 | 字段类型 | 说明 |
---|---|---|
key | string | 选项名称 |
wrong_list
返回字段 | 字段类型 | 说明 |
---|---|---|
id | string | 问题id |
title | string | 问题标题 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/user/answer
Response
{"list":{"wrong_data":[[{"question_id":"bc227250-db8b-11e6-b348-9d4ecc8d4129","title":"nodejs底层使用什么语言实现的?2","answers":["javascript","c","java","go"],"user_answer":"2","correct":"1"},{"question_id":"wq227250-db8b-11e6-b348-9d4ecc8d6129","title":"nodejs底层使用什么语言实现的?1","answers":["javascript","c","java","go"],"user_answer":"2","correct":"1"}],[]],"wrong_list":[{"id":"bc227250-db8b-11e6-b348-9d4ecc8d5129","title":"微录播是什么?"},{"id":"bc227250-db8b-11e6-b348-9d4ecc8d7129","title":"nodejs底层使用什么写的?"}]}}
/statistics/user/point/:swlid/:uid
application/json
GET
参数 必选 类型 说明 swlid string 微课swlid uid string 用户uid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
grasp_data | Array | 已掌握知识点数据 |
disgrasp_list | Array | 未掌握知识点数据 |
grasp_data
first(首轮学习擦除)
返回字段 | 字段类型 | 说明 |
---|---|---|
klgid | int | 知识点id |
title | string | 标题 |
time | int | 擦除时间 |
more(多次学习后擦除)
返回字段 | 字段类型 | 说明 |
---|---|---|
id | int | 知识点id |
title | string | 标题 |
time | int | 擦除时间 |
disgrasp_list
返回字段 | 字段类型 | 说明 |
---|---|---|
id | int | 知识点id |
title | string | 标题 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/user/point
Response
{
"status": 200,
"data": [{"grasp_data":[{"first":[{'id':1,"title":"微录播相机有几种配网方式?","time":'14009999'},{'id':2,"title":"微录播是视智云推出的一款微型录制与播出系统?","time":'14009999'}],"more":[{'id':1,"title":"微录播相机有几种配网方式?","time":'14009999'},{'id':2,"title":"微录播是视智云推出的一款微型录制与播出系统?","time":'14009999'}]}],"disgrasp_list":[{'id':1,'title':'微录播相机有几种配网方式?'},{'id':2,'title':'微录播是视智云推出的一款微型录制与播出系统?'}]}]
}
/statistics/wrongranking/:swlid
application/json
GET
参数 必选 类型 说明 swlid string 课程id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
result | Array | 返回结果 |
result
返回字段 | 字段类型 | 说明 |
---|---|---|
topic_id | int | 题目id |
type | string | 类型 |
question | string | 问题 |
option | array | 选项内容 |
answer | array | 答案 |
rate | array | 答错率 |
rate
返回字段 | 字段类型 | 说明 |
---|---|---|
rate | string | 错答率 |
wrong | int | 答错题人次 |
total | int | 总答题人次 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/wrongranking
Response
{
{"result":[{"topic_id":"bc227250-db8b-11e6-b348-9d4ecc8d4129","type":"single","question":"nodejs底层使用什么写的?","option":[0,3,3,0],"answer":"2","rate":{"rate":"1.00","wrong":6,"total":6}},{"topic_id":"wq227250-db8b-11e6-b348-9d4ecc8d6129","type":"single","question":"nodejs底层使用什么写的?","option":[0,0,1,0],"answer":"2","rate":{"rate":"1.00","wrong":1,"total":1}}]}
}
/statistics/points/:swlid
application/json
GET
参数 必选 类型 说明 swlid string 微课id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
klgid | int | 知识点id |
title | string | 知识点标题 |
wrong | array | 错题统计数据 |
clear | array | 擦除统计数据 |
wrong/clear
返回字段 | 字段类型 | 说明 |
---|---|---|
count | int | 操作数 |
total | int | 操作总数 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/points
Response
{
"status": 200,
"data": [{"uuid":"4","title":"微录播相机配网方式","wrong":[{"count":10,'total':20}],"clear":[{"count":10,'total':20}]}]
}
/statistics/student/clear/:swlid/:uid
application/json
GET
参数 必选 类型 说明 uid string 用户id swlid string 课时id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
summary | array | 概要 |
list | array | 擦除列表 |
summary
返回字段 | 字段类型 | 说明 |
---|---|---|
count | int | 擦除知识点总数 |
time | int | 知识点时长 |
list
返回字段 | 字段类型 | 说明 |
---|---|---|
id | int | pdf的id |
title | string | pdf标题 |
duration | int | pdf时长 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/student/clear
Response
{"result":{"summary":{"count":3,"time":180},"list":[{"page":3,"sTime":67,"id":10,"title":"随时录制,快速同步2","duration":3,"clear":true,"swpid":"pakit_12"},{"page":4,"sTime":67,"id":10,"title":"随时录制,快速同步","duration":3,"clear":true,"swpid":"pakit_12"},{"page":2,"sTime":67,"id":10,"title":"随时录制,快速同步","duration":3,"clear":true,"swpid":"pakit_12"}]}}
/statistics/student/wrong
application/json
GET
参数 必选 类型 说明 creator_uid string 用户id 必需 swlid string 课程id 必需 teacher_id string 老师id 用于需要根据老师id查询时 time string 时间id 用于需要根据老师id查询时
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
data | Array | 返回结果 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
answer_id | string | 问题id |
creator_uid | string | 学生id |
teacher_id | string | 老师id |
swlid | string | 课件id |
klgid | string | 知识点id |
topic_id | string | 问题id |
question | string | 问题标题 |
create_time | string | 答题时间 |
round | string | 答题轮次 |
option | Array | 问题选项 |
answer | Array | 用户回答id |
right_answer | Array | 正确答案id |
is_right | string | 是否答对 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/student/wrong
Response
{"status":200,"data":[{"creator_uid":"5112","klgid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","swlid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","topic_id":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","question":"nodejs底层使用什么语言实现的?","option":["javascript","c","java","go"],"answer":"2","right_answer":"1","is_right":"0","create_time":"2017-01-16 10:37:39"},{"creator_uid":"5112","klgid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","swlid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","topic_id":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","question":"nodejs底层使用什么语言实现的?","option":["javascript","c","java","go"],"answer":"2","right_answer":"1","is_right":"0","create_time":"2017-01-16 10:37:42"},{"creator_uid":"5112","klgid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","swlid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","topic_id":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97","question":"nodejs底层使用什么语言实现的?","option":["javascript","c","java","go"],"answer":"2","right_answer":"1","is_right":"0","create_time":"2017-01-16 10:37:43"}]}
/statistics/student/wrongkonwledge/:swlid/:klgid
application/json
GET
参数 必选 类型 说明 swlid string 课程id 必需 klgid string 问题关联的知识点id 必需
200
返回字段 | 字段类型 | 说明 |
---|---|---|
result | int | 返回状态码 |
result
返回字段 | 字段类型 | 说明 |
---|---|---|
title | json | 知识点名称 |
video_url | json | 视频路径 |
image | json | 截图 |
duration | json | 时长 |
swptitle | json | 课程名称 |
creator_nickname | json | 讲师 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/student/wrongkonwledge
Response
{
"result":[{"title":"微录播是一个知识的海洋1","video_url":"http://localhost:3000/image/1.mp4","image":"http://localhost:3000/image/1.png","duration":"4500","swptitle":"微录播","creator_nickname":"张老师"}]
}
/statistics/student/allwrongkonwledge/:swlid/:topic_id/:klgid
application/json
GET
参数 必选 类型 说明 swlid string 课程id 必需 topic_id string 问题id 必需 klgid string 知识点id 必需
200
返回字段 | 字段类型 | 说明 |
---|---|---|
data | array | 返回数据 |
success | boolean | 状态 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
result | array | 具体信息 |
status | string | 类型;swl/knowledge |
result
返回字段 | 字段类型 | 说明 |
---|---|---|
title | json | 知识点名称 |
video_url | json | 视频路径 |
image | json | 截图 |
duration | json | 时长 |
swptitle | json | 课程名称 |
creator_nickname | json | 讲师 |
Request
curl -X GET -H "Content-Type:application/json" http://statistics.luobo.com/statistics/student/allwrongkonwledge
Response
{"result":[{"title":"微录播是一个知识的海洋1","video_url":"http://localhost:3000/image/1.mp4","image":"http://localhost:3000/image/1.png","duration":"4500","swptitle":"微录播","creator_nickname":"张老师"},{"title":"微录播是一个知识的海洋1","video_url":"http://localhost:3000/image/1.mp4","image":"http://localhost:3000/image/1.png","duration":"4500","swptitle":"微录播","creator_nickname":"张老师"},{"title":"微录播是一个知识的海洋1","video_url":"http://localhost:3000/image/1.mp4","image":"http://localhost:3000/image/1.png","duration":"4500","swptitle":"微录播","creator_nickname":"张老师"}]}
app.getService('statistics').student.addwrong
application/json
POST
参数 必选 类型 说明 creator_uid string 用户id 必需 teacher_id string 老师id 必需 klgid string 知识点id 必需 swlid string 课件id 必需 answer string 选项id 必需 topic_id string 问题id 必需
200
返回字段 | 字段类型 | 说明 |
---|---|---|
data | Array | 答题记录 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/statistics/wrong/add
Response
{
"id":"d9ef3300-da36-11e6-b8e6-29424bbccfef",
"uid":"5112",
"swpid":"e4f25901-d7e1-11e6-b8a7-b720db0f6d97",
"question_id":"3b77d840-d7d3-11e6-ad05-fbb27da67fa4",
"answer_id":"2",
"uuid":"",
"time":"2017-01-14 16:53:00",
"round":6,"question":
"nodejs底层使用什么语言实现的?2",
"option":["javascript","c","java","php"],
"right_id":"1",
"right":0,
"_id":"5879e6ec5694fc229cb2fc8e"
}
app.getService('statistics').student.addclear
参数 必选 类型 说明 uid 是 string 用户id pdf_id|是 string pdf的id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
mes | string | 回调结果 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/statistics/clear/add
Response
{
"status": 200,
"mes": "xxxxx"
}
app.getService('statistics').student.addplay
参数 必选 类型 说明 uid 是 string 用户id swlid|是 string 课件的id time|是 string 播放视频的当前真实时刻
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | int | 返回状态码 |
mes | string | 回调结果 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/statistics/clear/add
Response
{
"status": 200,
"mes": "xxxxx"
}
/ask
application/json
POST
参数 必选 类型 说明 RequestBody classHashId 是 string 课时hashid classTitle 是 string 课时名称 klgHashId 是 string 知识点hashid klgTitle 是 string 知识点名称 toId 是 string 接收者uid content 是 string 内容
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 当前提交的内容 |
/ask
application/json
POST
参数 必选 类型 说明 RequestBody classHashId 是 string 课时hashid classTitle 是 string 课时名称 klgHashId 是 string 知识点hashid klgTitle 是 string 知识点名称 toId 是 string 接收者uid content 是 string 内容 toAskId 是 string 回复的问题askid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 当前提交的内容 |
/ask/list
application/json
get
参数 必选 类型 说明 RequestBody title 否 string 搜索问题的关键字 fromId 否 string 发送者uid toId 否 string 接收者uid sTime 否 string 开始时间(按时间区间搜索) eTime 否 string 结束时间(按时间区间搜索) classHashId 否 string 课时hashid klgHashId 否 string 知识点hashid
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
/ask/answer/:askId
application/json
get
参数 必选 类型 说明 RequestBody
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
/ask/:askId
application/json
put
参数 必选 类型 说明 RequestBody content 是 string 内容
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
/statistics/createAccount
application/json
POST
参数 必选 类型 说明 userId 是 int 帐号id username 是 string 帐号名 userType 是 int 用户类型 expertRank 是 int 专家类型 nickName 是 string 昵称 organId 是 int 组织id organKind 是 int 组织类型 provinceName 是 string 省份 cityName 是 string 城市 areaName 是 string 地区 province 是 string 省代号 city 是 string 市代号 area 是 string 地区代号
userType:1
参数 必选 类型 说明 tid 否 string 老师id;所在班级/专业(大学)存在执教老师时;多个老师时用','隔开 tname 否 string 老师帐号;多个老师时用','隔开
200
返回字段 | 字段类型 | 说明 |
---|---|---|
status | boolean | true/false |
mes | string | 返回结果 |
Request
curl -X POST -H "Content-Type:application/json" http://statistics.luobo.com/ask/statistics/createAccount
Response
{"status":true,"mes":"xxx"}
{"status":false,"mes":"xxx"}