From 3647d9c4b3f97596d7978670b76adb83bf4ee8a4 Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 20 May 2021 12:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E7=9A=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/api.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/doc/api.md b/doc/api.md index 887a7e7..747f89e 100644 --- a/doc/api.md +++ b/doc/api.md @@ -327,3 +327,60 @@ } ``` + +### 9. 用户统计信息 + +1. Method: POST +2. URI: /api/:accountid/stats + +| 字段 | 说明 | +| -------- | -------------------------------------- | +| accountid | 帐号id | + + + +3. Response: JSON + +```js +{ + "map": [ //能力地图数据 + { + "id": 0, + "name": "知识面", // 显示的文字 + "score": 6, // 分值 + "max": 20 // 该项最大分值 + }, + { + "id": 1, + "name": "知识深度", + "score": 11, + "max": 20 + }, + { + "id": 2, + "name": "反应能力", + "score": 15, + "max": 20 + }, + { + "id": 3, + "name": "毅力", + "score": 14, + "max": 20 + }, + { + "id": 4, + "name": "其他", + "score": 2, + "max": 20 + } + ], + "rightCount": 100, // 总的答对的题目数量 + "errorCount": 100, // 总的答错的题目数量 + "singleCount": 20, // 单人模式参与局数 + "singleWin": 15, // 单人模式胜利局数 + "singleLose": 5, // 单人模式失败局数 + "activityCount": 20, // 参与活动数量 + "examCount": 21 // 参与挑战数量 + } +```