Commit 1ef05fe9 by 李进峰

update

parent 13643555
...@@ -243,4 +243,54 @@ FAILTURE ...@@ -243,4 +243,54 @@ FAILTURE
"msg": "数据有误", "msg": "数据有误",
"data": null "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
### 交游分发接口
##### 接口转发 ### 交游分发接口
URL: BaseUrl:18082/api/dispatch URL: {BaseUrl}/api/dispatch
METHOD: POST METHOD: POST
...@@ -13,14 +13,14 @@ Headers: ...@@ -13,14 +13,14 @@ Headers:
ReqeustBody: ReqeustBody:
``` ```
{ {
"path":"", // 请求路径 "path":"", // 交游接口路径
"method":"", // GET PUT POST ... "method":"", // GET PUT POST ...
"params":"", // json string 可为空 "params":"", // json string 可为空
"body":"" // json string 可为空 "body":"" // json string 可为空
} }
``` ```
responseBody: ResponseBody:
``` ```
SUCCESS: SUCCESS:
{ {
...@@ -35,3 +35,33 @@ FAILTURE: ...@@ -35,3 +35,33 @@ FAILTURE:
} }
``` ```
以获取渠道配置接口为例子
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": "成功"
}
```
### 获取渠道配置接口
- BaseUrl: ### 获取渠道配置接口
- 测试服: http://api-pre.heyqiwu.cn:18082
- 产品服: http://api-pro.heyqiwu.cn:18082
##### 获取渠道提示信息 URL: {BaseUrl}/api/app/hint
URL: BaseUrl:18082/api/app/hint
METHOD: GET METHOD: GET
...@@ -21,7 +17,7 @@ RequestParam: ...@@ -21,7 +17,7 @@ RequestParam:
| :----------- | :------------: | :-----: | | :----------- | :------------: | :-----: |
| field | 指定域的名称 | 选填 | | field | 指定域的名称 | 选填 |
responseBody: ResponseBody:
``` ```
SUCCESS: SUCCESS:
{ {
...@@ -37,9 +33,34 @@ FAILTURE: ...@@ -37,9 +33,34 @@ FAILTURE:
"msg":"渠道配置错误,请联系管理员" "msg":"渠道配置错误,请联系管理员"
} }
``` ```
##### 获取渠道作品提示信息
URL: BaseUrl:18082/api/app/bot/hint
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 METHOD: GET
...@@ -51,12 +72,13 @@ Headers: ...@@ -51,12 +72,13 @@ Headers:
| App-Channel-Id | 渠道ID | | App-Channel-Id | 渠道ID |
RequestParam: RequestParam:
| key | value | 是否必填 | key | value | 是否必填
| :----------- | :------------: | :-----: | | :----------- | :------------: | :-----: |
| workName | 作品名称 | 必填 | | workName | 作品名称 | 必填 |
| field | 指定域的名称 | 选填 | | field | 指定域的名称 | 选填 |
responseBody: ResponseBody:
``` ```
SUCCESS: SUCCESS:
{ {
...@@ -72,3 +94,25 @@ FAILTURE: ...@@ -72,3 +94,25 @@ FAILTURE:
"msg":"渠道作品配置错误,请联系管理员" "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": "成功"
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment