题库工具
在线搜题 / 接口对接在线搜题
接口对接(OCS / 自写脚本)
把下面这段填进 OCS 的题库配置里,密钥换成你自己的(个人中心 → 密钥)。
接口
GET /api/search?title=题干&type=single&options=选项&key=密钥
POST /api/search body: {"title":"…","type":"single","options":"…","key":"…"}
返回
{"code":1,"data":{"answers":[{"question":"…","answer":"…","course":"…"}]}}
{"code":0,"msg":"未找到答案"} / {"code":402,"msg":"积分不足"}
GET /api/search?title=题干&type=single&options=选项&key=密钥
POST /api/search body: {"title":"…","type":"single","options":"…","key":"…"}
返回
{"code":1,"data":{"answers":[{"question":"…","answer":"…","course":"…"}]}}
{"code":0,"msg":"未找到答案"} / {"code":402,"msg":"积分不足"}