From 3cc3f5aa57e5369daefa39a2a3b5db9e13783cf6 Mon Sep 17 00:00:00 2001 From: hxw Date: Sat, 23 Mar 2019 10:39:08 +0800 Subject: [PATCH] update --- 新平台机器人数据结构.md | 316 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 303 insertions(+), 13 deletions(-) diff --git "a/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" "b/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" index 1704b94..48bbba3 100644 --- "a/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" +++ "b/\346\226\260\345\271\263\345\217\260\346\234\272\345\231\250\344\272\272\346\225\260\346\215\256\347\273\223\346\236\204.md" @@ -1,6 +1,6 @@ -#### 新平台机器人新建机器人接口 +#### 新平台机器人新建接口 -接口名: http://aliyun-hz1.chewrobot.com:1111/conditionProcess +接口名: http://aliyun-hz1.chewrobot.com:8081/condition METHOD: POST @@ -16,7 +16,8 @@ URL Parameters: |参数名 | 数据类型 | 描述| SendWay | | :----------- | :------: | :------------ | :------- | -| type | string | 默认为"game_bot_init" | JSON | +| type | string | 默认为"bot_init" | JSON | +| bot_type | string | bot类型 | JSON | | userName | string | 用户名 | JSON | | botName_yhm | string | bot的名字 | JSON | | catName | string | bot类别名 | JSON | @@ -27,13 +28,15 @@ responseBody: ``` { "status": 状态码, 成功时为1, 失败为0 - "parameters": 如果状态为1,返回Map{"botAccount":"***"}, 如果状态为0,paramters为失败原因String + "parameter": 如果状态为0,paramters为失败原因, 如果状态是1,parameter为{"botId":int, botAccount:""} + } +``` -#### 新平台机器人删除配置条目接口 +#### 新平台机器人添加condition -接口名: http://aliyun-hz1.chewrobot.com:1111/condition +接口名: http://aliyun-hz1.chewrobot.com:8081/condition METHOD: POST @@ -49,19 +52,306 @@ URL Parameters: |参数名 | 数据类型 | 描述| SendWay | | :----------- | :------: | :------------ | :------- | -| type | string | "delete_config" | JSON | -| configId | string | 配置条目id | JSON | -| botId | string | bot的id | JSON | -| botName | string | bot的引擎账号,用于修改后台配置文本 | JSON | - - +| type | string | 默认为"insert_condition" | JSON | +| conditionData | JSONArray | condition数据 | JSON | +| botName_yhm | string | bot的名字 | JSON | +| catName | string | bot类别名 | JSON | +| botId | string | 默认为"undefined" | JSON | + responseBody: ``` { "status": 状态码, 成功时为1, 失败为0 - "parameters": 如果状态为0,paramters为失败原因String + "parameter": 如果状态为0,paramters为失败原因 + } +``` + + + +#### 新平台机器人更新condition + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| +URL Parameters: +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"update_condition" | JSON | +| conditionId | int | conditionId | JSON | +| conditionData | JSONArray | condition数据 | JSON | +| botName_yhm | string | bot的名字 | JSON | +| catName | string | bot类别名 | JSON | +| botId | string | 默认为"undefined" | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramters为失败原因 + +} +``` + +#### 新平台机器人查询condition + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"query_condition" | JSON | +| queryType | String | 查询类型:all/category | JSON | +| botId | string | 默认为"undefined" | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramters为失败原因, 如果状态为1,则返回condition列表 + +} +``` + +#### 新平台机器人更新初始问题 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"change_active" | JSON | +| activeConditionId | int | 设为初始问题的conditionId | JSON | +| botId | string | 默认为"undefined" | JSON | +| botName_yhm | string | bot的名字 | JSON | +| catName | string | bot类别名 | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramters为失败原因 + +} +``` + + +#### 新平台机器人删除condition + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"delete_condition" | JSON | +| conditionId | int | conditionId | JSON | +| botId | int | botId | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramters为失败原因 + +} +``` + +#### 新平台机器人更新condition名字 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"update_condition_name" | JSON | +| conditionId | int | conditionId | JSON | +| botId | int | botId | JSON | +| conditionName | string | 新的condition名字 | JSON | +| botName_yhm | string | bot的名字 | JSON | +| catName | string | bot类别名 | JSON | + + + +#### 新平台机器人更新机器人结束语 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"update_goodbye" | JSON | +| botId | int | botId | JSON | +| sayGoodBye | string | 新的结束语 | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramter为失败原因 + +} +``` + + +#### 新平台机器人更新condition显示顺序 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"update_condition_display_order" | JSON | +| botId | int | botId | JSON | +| conditionId | int | conditionId | JSON | +| order | int | 顺序(默认是999) | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramter为失败原因 + +} +``` + + +#### 新平台机器人更新bot信息 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"update_bot_info" | JSON | +| botId | int | botId | JSON | +| botName_yhm | string | bot的名字 | JSON | +| catName | string | bot类别名 | JSON | +| option | string | 要更新的字段 | JSON | +| value | string | 要更新的值 | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为0,paramter为失败原因 + +} +``` + + +#### 查询待激活的配置文件 + +接口名: http://aliyun-hz1.chewrobot.com:8081/condition + +METHOD: POST + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8| +| Authorization | Bearer YOUR_ACCESS_TOKEN| + + +URL Parameters: + +|参数名 | 数据类型 | 描述| SendWay | +| :----------- | :------: | :------------ | :------- | +| type | string | 默认为"query_sleeping_config" | JSON | +| botId | int | botId | JSON | + +responseBody: +``` +{ + "status": 状态码, 成功时为1, 失败为0 + "parameter": 如果状态为1,paramters为[[configId, configName]] + +} +``` -- libgit2 0.27.1