QUESTION-题库.md 1.7 KB

QUESTION - 题库

url 前缀:question

示例:https://xxxxxxxxx/api/question

得到推荐题目

post /recommend

Parameters

interface recommendDTO {
  courseId: number;
  userId: number;
  knowledgeId: Array<string>;
  questionNum: number;
}

Response

interface ResponseData {
  res: [
    {
      id: number;
      type: string;
      stem: string;
      options: {
        [key: string]: string;
      };
      tags: string[];
      knowledgeId: string[];
      lastModified: Date;
    }
  ];
}

Example Response

{
  "res": {
    "id": 11,
    "type": "choice",
    "stem": "这是一次测试",
    "options": {
      "A": "2k-l > n + k",
      "B": "2n-l <= n + k",
      "C": "n = k",
      "D": "n-l <= k"
    },
    "tags": ["test", "ok"],
    "knowledgeId": ["A.B", "C.D"],
    "lastModified": "2019-12-30 18:12:13"
  }
}

得到题目答案与解析

post /answer

Parameters

interface recommendDTO {
  questionId: Array<number>;
}

Response

interface ResponseData {
  res: Array<{
    id: number;
    type: string;
    stem: string;
    options: {
      [key: string]: string;
    };
    tags: string[];
    knowledgeId: string[];
    lastModified: Date;
    answer: string;
    analysis: string;
  }>;
}

Example Response

{
  "res": [
    {
      "id": 11,
      "type": "choice",
      "stem": "这是一次测试",
      "options": {
        "A": "2k-l > n + k",
        "B": "2n-l <= n + k",
        "C": "n = k",
        "D": "n-l <= k"
      },
      "tags": ["test", "ok"],
      "knowledgeId": ["A.B", "C.D"],
      "lastModified": "2019-12-30 18:12:13",
      "tq_id": 11
    }
  ]
}