Skip to content

针对OCS设计的API配置

您只需复制以下题库配置,按操作步骤将配置粘贴到指定位置即可使用。

操作步骤

对于传统题库配置粘贴到

对于Tiku适配器配置仅需粘贴接口服务链接即可

json
[
    {
        "name": "Hcat题库",
        "homepage": "http://ti.hcat.work/",
        "url": "http://api.hcat.work:3000/api/getAnswer",
        "method": "get",
        "type": "GM_xmlhttpRequest",
		"contentType": "json",
        "data": {
            "question": "${title}",
            "options": "${options}"
        },
        "headers": {
            "Content-Type": "application/x-www-form-urlencoded",
            "Authorization": "AdminHcat"
        },
        "handler": "return  (res)=> res.code === 1 ? [res.question,res.answer] : [res.message,undefined]"
    }
]
json
[
    {
        "name": "言溪题库",
        "homepage": "https://tk.enncy.cn/",
        "url": "https://tk.enncy.cn/query",
        "method": "get",
        "type": "GM_xmlhttpRequest",
        "contentType": "json",
        "data": {
            "token": "92d6f7ab883d41a59e2dc9c2120045a7",
            "title": "${title}",
            "options": "${options}",
            "type": "${type}"
        },
        "handler": "return (res)=>res.code === 0 ? [res.data.answer, undefined] : [res.data.question,res.data.answer]"
    },
    {
        "name": "网课小工具题库(GO题)",
        "homepage": "https://cx.icodef.com/",
        "url": "https://cx.icodef.com/wyn-nb?v=4",
        "method": "post",
        "type": "GM_xmlhttpRequest",
        "data": {
            "question": "${title}"
        },
        "headers": {
            "Content-Type": "application/x-www-form-urlencoded",
            "Authorization": ""
        },
        "handler": "return  (res)=> res.code === 1 ? [undefined,res.data] : [res.msg,undefined]"
    }
]
json
http://api.hcat.work:8060/adapter-service/search?use=local

遵循 MIT 开放源代码许可