baseUrl: http://aws-nx2.chewrobot.com ##### 更新用户信息(APP) URL: baseUrl:18082/api/userInfo METHOD: PUT ReqeustParams: | Parameter | Type | Description | | :----------- |:------| :------------ | | userId | String | 用户Id(选填,兼容以前的接口) | RequestBody: ``` { nickname: // String 用户昵称 sex: // 性别 Number [ 0 | 1 | 2 ] // 0:表示未知 1:表示男 2:表示女 birthday: // 时间戳 Number 默认为null ageSegment: // Number 年龄段{ "10后":0, "00后":1, "95后":2, "90后":3, "80后":4, "70后":5, "60后":6} 默认为null headImgUrl:"" } ``` Headers: | key | value| | :----------- | :------------ | | Content-Type | application/json;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | | App-Channel-Id | 渠道ID(选填)默认 JIAOYOUTIANXIA | | ApiToken | 配合App-Channel-Id(选填) | responseBody: ``` SUCCESS: { "code":1, "msg":"SUCCESS", "data":null } ``` ##### 获取用户信息(APP) URL: baseUrl:18082/api/userInfo METHOD: GET Headers: | key | value| | :----------- | :------------ | | Content-Type | application/json;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | | App-Channel-Id | 渠道ID(选填)默认 JIAOYOUTIANXIA | | ApiToken | 配合App-Channel-Id(选填) | ReqeustParams: | Parameter | Type | Description | | :----------- |:------| :------------ | | userId | String | 用户Id(选填,兼容以前的接口) | | deviceType | Number | 设备类型0:苹果,1:安卓,2:其他 | responseBody: ``` SUCCESS: { "code":1, "msg":"SUCCESS", "data":{ infoId: // Number 用户ID nickname: // String 用户昵称 sex: // 性别 Number [ 0 | 1 | 2 ] // 0:表示未知 1:表示男 2:表示女 birthday: // 时间戳 Number userPhone: // 电话号 String ageSegment: // Number 年龄段{ "10后":0, "00后":1, "95后":2, "90后":3, "80后":4, "70后":5, "60后":6} 默认为null headImgUrl:"" } } ``` ##### 上传头像(APP) URL: baseUrl:18082/api/upload/file/userHeadImg METHOD: POST ReqeustParams: | Parameter | Type | Description | | :----------- | :------: | ------------: | | picFile | File | 头像文件流 | responseBody: ``` SUCCESS: { code:1, msg:"SUCCESS", data:{ "absolutePath":"" } } ``` ##### 用户玩过的BOT URL: baseUrl:18082/api/user/history METHOD: Get ReqeustParams: | Parameter | Type | Description | | :----------- |:------| :------------ | | userId | String | 用户Id(选填,兼容以前的接口) | | deviceType | Number | 设备类型0:苹果,1:安卓,2:其他 | Headers: | key | value | | :----------- | :------------: | | Content-Type | application/x-www-form-urlencoded;charset=utf-8 | | Authorization | Bearer YOUR_ACCESS_TOKEN | | App-Channel-Id | 渠道ID(选填)默认 JIAOYOUTIANXIA | | ApiToken | 配合App-Channel-Id(选填) | responseBody: ``` SUCCESS: { "code":1, "msg":成功, "data": [{ "botAccount": "7051119238", "workName": "郡主修道之路", "authorName": "詹ww", "workBannerUrl": "http://aws-nx2.chewrobot.com:8888/Editor/upload/img/other/default_banner_320*320.jpg", "gmtModified": 1566278482000 }, { "botAccount": "2090828382", "workName": "小狗小白", "authorName": "xiaorong", "workBannerUrl": "http://aws-nx2.chewrobot.com:8888/Editor/upload/img/other/2019/08/10161536472.jpeg", "gmtModified": 1566278512000 }, { "botAccount": "2675579304", "workName": "会数学的杰瑞", "authorName": "瓶子", "workBannerUrl": "http://aws-nx2.chewrobot.com:8888/Editor/upload/img/other/2019/07/08160501436.png", "gmtModified": 1566279031000 }, { "botAccount": "4151097686", "workName": "交游天下作品推荐", "authorName": "北卡来罗", "workBannerUrl": "http://aws-nx2.chewrobot.com:8888/Editor/upload/img/other/default_banner_320*320.jpg", "gmtModified": 1566279078000 }, { "botAccount": "6854303973", "workName": "星球问答", "authorName": "北卡来罗", "workBannerUrl": "http://aws-nx2.chewrobot.com:8888/Editor/upload/img/other/2019/07/10141824003.png", "gmtModified": 1566279087000 }] } FAILTURE: { "code":20002, "msg":用户认证失败!, "data":null } ```