From 1ef05fe98da176804e83d86b679b5d1a3ee176d5 Mon Sep 17 00:00:00 2001 From: jinfengli Date: Thu, 21 Jul 2022 20:26:03 +0800 Subject: [PATCH] update --- app_doc/ad_api_v2.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ app_doc/app_hint_info.md | 74 -------------------------------------------------------------------------- app_doc/request_dispach.md | 37 ------------------------------------- app_doc/交游分发接口.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app_doc/交游配置中心接口.md | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 235 insertions(+), 111 deletions(-) delete mode 100644 app_doc/app_hint_info.md delete mode 100644 app_doc/request_dispach.md create mode 100644 app_doc/交游分发接口.md create mode 100644 app_doc/交游配置中心接口.md diff --git a/app_doc/ad_api_v2.md b/app_doc/ad_api_v2.md index 60679b6..108b93a 100644 --- a/app_doc/ad_api_v2.md +++ b/app_doc/ad_api_v2.md @@ -243,4 +243,54 @@ FAILTURE "msg": "数据有误", "data": null } +``` + +##### 获取控制点广告的状态 + +URL: {BaseUrl}:18082/api/ad/v2/status + +Method: GET + +Headers: + +| key | value| +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| App-Channel-Id | 必填 | +| ApiToken | 必填 | + +RequestParams: + +| 字段 | 描述| +| :----------- | :------------ | +| uid | 用户ID, 必填 | +| controlId | 控制点ID, 必填 | + + +ResponseBody: +``` +SUCCESS: +{ + "code": 1, + "data": { + "status":1 + }, + "msg": "成功" +} +``` + +通过分发接口调用示例 + +Example: +``` +curl --location --request POST 'http://api-pre.heyqiwu.cn:18082/api/dispatch' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'ApiToken: test token' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "path":"/api/ad/v2/status", + "method":"GET", + "params":"{\"uid\":\"123\",\"controlId\":\"1231\"}", + "body":"" +}' ``` \ No newline at end of file diff --git a/app_doc/app_hint_info.md b/app_doc/app_hint_info.md deleted file mode 100644 index cde1e90..0000000 --- a/app_doc/app_hint_info.md +++ /dev/null @@ -1,74 +0,0 @@ -- BaseUrl: - - 测试服: http://api-pre.heyqiwu.cn:18082 - - 产品服: http://api-pro.heyqiwu.cn:18082 - -##### 获取渠道提示信息 - -URL: BaseUrl:18082/api/app/hint - -METHOD: GET - -Headers: - -| key | value | -| :----------- | :------------: | -| Content-Type | application/json;charset=utf-8 | -| App-Channel-Id | 渠道ID | - -RequestParam: - -| key | value | 是否必填 -| :----------- | :------------: | :-----: | -| field | 指定域的名称 | 选填 | - -responseBody: -``` -SUCCESS: -{ - "code":1, - "msg":"成功", - "data":{ - // 管理员配置的各种域的信息 - } -} -FAILTURE: -{ - "code":50002, - "msg":"渠道配置错误,请联系管理员" -} -``` -##### 获取渠道作品提示信息 - -URL: BaseUrl:18082/api/app/bot/hint - -METHOD: GET - -Headers: - -| key | value | -| :----------- | :------------: | -| Content-Type | application/json;charset=utf-8 | -| App-Channel-Id | 渠道ID | - -RequestParam: -| key | value | 是否必填 -| :----------- | :------------: | :-----: | -| workName | 作品名称 | 必填 | -| field | 指定域的名称 | 选填 | - -responseBody: -``` -SUCCESS: -{ - "code":1, - "msg":"成功", - "data":{ - // 管理员配置的各种域的信息 - } -} -FAILTURE: -{ - "code":50002, - "msg":"渠道作品配置错误,请联系管理员" -} -``` diff --git a/app_doc/request_dispach.md b/app_doc/request_dispach.md deleted file mode 100644 index 16a3992..0000000 --- a/app_doc/request_dispach.md +++ /dev/null @@ -1,37 +0,0 @@ -##### 接口转发 - -URL: BaseUrl:18082/api/dispatch - -METHOD: POST - -Headers: - -| key | value | -| :----------- | :------------: | -| Content-Type | application/json;charset=utf-8 | - -ReqeustBody: -``` -{ - "path":"", // 请求路径 - "method":"", // GET PUT POST ... - "params":"", // json string 可为空 - "body":"" // json string 可为空 -} -``` - -responseBody: -``` -SUCCESS: -{ - "code":1, - "msg":"成功", - "data": "" // json string -} -FAILTURE: -{ - "code":50002, - "msg":"数据有误" -} - -``` diff --git "a/app_doc/\344\272\244\346\270\270\345\210\206\345\217\221\346\216\245\345\217\243.md" "b/app_doc/\344\272\244\346\270\270\345\210\206\345\217\221\346\216\245\345\217\243.md" new file mode 100644 index 0000000..d6835f3 --- /dev/null +++ "b/app_doc/\344\272\244\346\270\270\345\210\206\345\217\221\346\216\245\345\217\243.md" @@ -0,0 +1,67 @@ +### 交游分发接口 + +URL: {BaseUrl}/api/dispatch + +METHOD: POST + +Headers: + +| key | value | +| :----------- | :------------: | +| Content-Type | application/json;charset=utf-8 | + +ReqeustBody: +``` +{ + "path":"", // 交游接口路径 + "method":"", // GET PUT POST ... + "params":"", // json string 可为空 + "body":"" // json string 可为空 +} +``` + +ResponseBody: +``` +SUCCESS: +{ + "code":1, + "msg":"成功", + "data": "" // json string +} +FAILTURE: +{ + "code":50002, + "msg":"数据有误" +} + +``` + + +以获取渠道配置接口为例子 + +RequestExample +``` +curl --location --request POST 'http://api-pre.heyqiwu.cn:18082/api/dispatch' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "path":"/api/app/hint", + "method":"GET", + "params":"{\"field\":\"agreement\"}", + "body":"" +}' +``` + +ResponseExample +``` +{ + "code": 1, + "data": "{\"agreement\":{\"privacy\":{\"title\":\"隐私协议\", + \"url\":\"http://image.heyqiwu.cn/media/txt/mobileapp/ + privacy_content.txt\"},\"pay\":{\"title\":\"互动小说付费说明\", + \"url\":\"http://image.heyqiwu.cn/media/txt/pay_content.txt\"}, + \"user\":{\"title\":\"用户协议\",\"url\":\"http://image.heyqiwu.cn/ + media/txt/user_content.txt\"}}}", + "msg": "成功" +} +``` diff --git "a/app_doc/\344\272\244\346\270\270\351\205\215\347\275\256\344\270\255\345\277\203\346\216\245\345\217\243.md" "b/app_doc/\344\272\244\346\270\270\351\205\215\347\275\256\344\270\255\345\277\203\346\216\245\345\217\243.md" new file mode 100644 index 0000000..9f6c0f6 --- /dev/null +++ "b/app_doc/\344\272\244\346\270\270\351\205\215\347\275\256\344\270\255\345\277\203\346\216\245\345\217\243.md" @@ -0,0 +1,118 @@ +### 获取渠道配置接口 + +URL: {BaseUrl}/api/app/hint + +METHOD: GET + +Headers: + +| key | value | +| :----------- | :------------: | +| Content-Type | application/json;charset=utf-8 | +| App-Channel-Id | 渠道ID | + +RequestParam: + +| key | value | 是否必填 +| :----------- | :------------: | :-----: | +| field | 指定域的名称 | 选填 | + +ResponseBody: +``` +SUCCESS: +{ + "code":1, + "msg":"成功", + "data":{ + // 管理员配置的各种域的信息 + } +} +FAILTURE: +{ + "code":50002, + "msg":"渠道配置错误,请联系管理员" +} +``` + + +RequestExample +``` +curl --location --request POST 'http://api-pre.heyqiwu.cn:18082/api/dispatch' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "path":"/api/app/hint", + "method":"GET", + "params":"{\"field\":\"agreement\"}", + "body":"" +}' +``` + +ResponseExample +``` +{ + "code": 1, + "data": "{\"agreement\":{\"privacy\":{\"title\":\"隐私协议\",\"url\":\"http://image.heyqiwu.cn/media/txt/mobileapp/privacy_content.txt\"},\"pay\":{\"title\":\"互动小说付费说明\",\"url\":\"http://image.heyqiwu.cn/media/txt/pay_content.txt\"},\"user\":{\"title\":\"用户协议\",\"url\":\"http://image.heyqiwu.cn/media/txt/user_content.txt\"}}}", + "msg": "成功" +} +``` + +--- +### 获取渠道作品配置接口 + +URL: {BaseUrl}/api/app/bot/hint + +METHOD: GET + +Headers: + +| key | value | +| :----------- | :------------: | +| Content-Type | application/json;charset=utf-8 | +| App-Channel-Id | 渠道ID | + +RequestParam: + +| key | value | 是否必填 +| :----------- | :------------: | :-----: | +| workName | 作品名称 | 必填 | +| field | 指定域的名称 | 选填 | + +ResponseBody: +``` +SUCCESS: +{ + "code":1, + "msg":"成功", + "data":{ + // 管理员配置的各种域的信息 + } +} +FAILTURE: +{ + "code":50002, + "msg":"渠道作品配置错误,请联系管理员" +} +``` + +RequestExample +``` +curl --location --request POST 'http://api-pre.heyqiwu.cn:18082/api/dispatch' \ +--header 'App-Channel-Id: tongyong-phone-mobileapp-test1' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "path":"/api/app/bot/hint", + "method":"GET", + "params":"{\"field\":\"testField\",\"workName\":\"游乐场杀人事件\"}", + "body":"" +}' +``` + +ResponseExample +``` +{ + "code": 1, + "data": "{\"testField\":{\"fieldName\":\"price\",\"fieldValue\":\"30\"}}", + "msg": "成功" +} +``` -- libgit2 0.27.1