Git Product home page Git Product logo

xuexi's Introduction

学习强国在线题库

接口信息

接口地址:https://api.myue.gq/xuexi/answer.php
请求方式:GET/POST
返回格式:JSON
请求示例:https://api.myue.gq/xuexi/answer.php?question=太阳能是地球大部分能源的来源&version=2.3.3&category=挑战题

请求参数

名称 类型 必填 备注
question string NULL
version string 2.3.3
category string [填空题, 对战题, 挑战题]

返回示例

[
    {
        "category": "挑战题",
        "answer": "风能",
        "question": "太阳能是地球大部分能源的来源,下列选项中,属于太阳能的转化形式的是。"
    }
]

返回参数说明

名称 类型 说明
category string 类别
answer string 答案
question string 题目

示例代码 Auto.js

/**
 * @description: 搜索答案
 * @author: Myue
 * @return: answer 答案
 */
function getAnswer(question, types) {
    console.log("题目类型 :" + types);
    var url = "https://api.myue.gq/xuexi/answer.php";
    var res = http.post(url, {
        "question": question,
        "category": types,
        "version": "2.3.3"
    });
    var res = res.body.json();
    if (res.length != 0) {
        console.info('Get Success');
        return res[0].answer;
    } else {
        console.error("题库中未找到答案");
        return '';
    }
}

xuexi's People

Contributors

qxwlmz avatar

Stargazers

 avatar FsdSoyu avatar  avatar Jim avatar  avatar  avatar  avatar Liu Min avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xuexi's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.