1. 选择科目接口
请求地址 :http://localhost:8080/apcompany/show/content/list
参数 :无
请求方式 :GET
请求结果样例:
[ { "picture": "", "id": 1, "parentId": 0, "name": "AP", "children": [ { "picture": "", "id": 7, "parentId": 1, "name": "AP微积分" }, { "picture": "", "id": 8, "parentId": 1, "name": "AP生物" }, { "picture": "", "id": 9, "parentId": 1, "name": "AP化学" }, { "picture": "", "id": 10, "parentId": 1, "name": "AP物理" } ] }, { "picture": "", "id": 2, "parentId": 0, "name": "IB" }, { "picture": "", "id": 3, "parentId": 0, "name": "A-Level" }, { "picture": "", "id": 4, "parentId": 0, "name": "IGCSE" }, { "picture": "", "id": 5, "parentId": 0, "name": "SAT/ACT" }, { "picture": "", "id": 6, "parentId": 0, "name": "SSAT" } ]
结果说明:
picture 是存放图片的地址,
id 是科目主键
name:名称
2 .获取知识点接口
请求地址:http://localhost:8080/apcompany/show/keypoint/{catalogId}
请求方式:GET
参数:catalogId 目录ID 也就是选择科目接口里面的主键id号,例如7
请求结果样例:
[ { "id": 1, "parentId": 0, "name": "Limits", "children": [ { "id": 4, "parentId": 1, "name": "Limits basics" }, { "id": 5, "parentId": 1, "name": "Limits introduction" }, { "id": 6, "parentId": 1, "name": "Limits from tables" }, { "id": 7, "parentId": 1, "name": "Limits from graphs" }, { "id": 8, "parentId": 1, "name": "One-sided vs. Two-sided limits" }, { "id": 9, "parentId": 1, "name": "Exploring Continuity" } ] }, { "id": 2, "parentId": 0, "name": "Continuity", "children": [ { "id": 10, "parentId": 2, "name": "Continuity at a point" }, { "id": 11, "parentId": 2, "name": "Limits of combined & composite functions" }, { "id": 12, "parentId": 2, "name": "Continuous functions" }, { "id": 13, "parentId": 2, "name": "Intermediate value theorem" } ] }, { "id": 3, "parentId": 0, "name": "Differentiating common functions", "children": [ { "id": 14, "parentId": 3, "name": "Polynomial function differentiaiton" }, { "id": 15, "parentId": 3, "name": "Rational functions differentiation" }, { "id": 16, "parentId": 3, "name": "Radical functions differentiation" }, { "id": 17, "parentId": 3, "name": "Trigonometric functions differentiation" }, { "id": 18, "parentId": 3, "name": "Exponential functions differentiation" }, { "id": 19, "parentId": 3, "name": "Logarithmic functions differentiation" } ] } ]
结果说明:
Id | 知识点主键 |
name | 知识点名称 |
child | 知识点小类 |
3 获取例题接口
请求地址:http://localhost:8080/apcompany/data//getExample/{keypointId}
请求方式:GET
参数:keypointId 目录ID 也就是选择知识点接口里面的主键id号 例如14
请求方式 :GET
请求样例:
{ "ctime": 1502932205000, "id": 1, "keypointId": 14, "question": "find an equation of the tangent line to f(x)=x*x-x +1 at x=3", "status": 0, "type": 0, "utime": 1502932205000 }
结果集说明
1. ctime 创建时间;
2、id 主键
3.keypointId 知识点ID
4.question 问题
5.status 状态,0有效,1 无效
6.type 0 是例题,1 是真实题目
7.utime 更改时间
4 校验例题答案接口
请求地址:http://localhost:8080/apcompany/data/answers/valid/{questionId}?input=4
请求方式:GET
参数:questionId 问题ID ,例如1 ,input 输入的答案
结果
false
或者
true