Bay преди 6 години
родител
ревизия
1ef193d20f
променени са 1 файла, в които са добавени 78 реда и са изтрити 85 реда
  1. 78 85
      api/REST-推荐.md

+ 78 - 85
api/REST-推荐.md

@@ -1,16 +1,16 @@
-# rest - 推荐
+# QUESTION - 题库
 
-> url 前缀:**rest/tq**
+> url 前缀:**question**
 >
-> 示例:**https://xxxxxxxxx/rest/tq/recommend**
+> 示例:**https://xxxxxxxxx/api/question**
 
-##  得到推荐题目
+## 得到推荐题目
 
 ```http
-post /rest/tq/recommend
+post /recommend
 ```
 
-### Parameters
+### Parameters
 
 ```ts
 interface recommendDTO {
@@ -21,58 +21,54 @@ interface recommendDTO {
 }
 ```
 
-### Response
-
-`````ts
-interface ResponseData{
-  res:[{
-    id:           number;
-    type:         string;
-    stem:         string;
-    options:    {
-       [key: string]: string;
-    };
-    tags:         string[];
-    knowledgeId:  string[];
-    lastModified: Date;
-  }]
+### Response
+
+```ts
+interface ResponseData {
+  res: [
+    {
+      id: number;
+      type: string;
+      stem: string;
+      options: {
+        [key: string]: string;
+      };
+      tags: string[];
+      knowledgeId: string[];
+      lastModified: Date;
+    }
+  ];
 }
 ```
 
 ### Example Response
 
-````json
+```json
 {
-"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
+  "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"
+  }
 }
-}
-`````
+```
 
-##  得到题目答案与解析
+## 得到题目答案与解析
 
 ```http
-post /rest/tq/recommend
+post /answer
 ```
 
-### Parameters
+### Parameters
 
 ```ts
 interface recommendDTO {
@@ -80,49 +76,46 @@ interface recommendDTO {
 }
 ```
 
-### Response
-
-`````ts
-interface ResponseData{
-  res:[{
-    id:           number;
-    type:         string;
-    stem:         string;
-    options:    {
-       [key: string]: string;
-    };
-    tags:         string[];
-    knowledgeId:  string[];
-    lastModified: Date;
-    answer:       string;
-    analysis:     string;
-  }]
+### Response
+
+```ts
+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
 
-````json
+```json
 {
-"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
+  "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
+    }
+  ]
 }
-}
-`````
+```