API DOC

A succinct hexo theme...

Posted by koocyton on 2020-01-17
Estimated Reading Time 2 Minutes
Words 471 In Total
Viewed Times

1. 获取公钥

1
2
3
4
5
6
7
8
9
10
11
GET /api/v1/ad/protocol/secureTokens

返回
{
"code": "0",
"message": "success",
"data": {
"公钥1 key": "公钥1",
"公钥2 key": "公钥2"
}
}

2. 上传密钥

1
2
3
4
5
6
7
POST /api/v1/ad/protocol/encryptKey

请求
xx...:xxx...

返回
xxxxx....

3. 基本配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
POST /api/v1/ad/config

请求
{
"adPlatform":"Vivo", // 平台 Oppo Xiaomi Huawei..
"businessCode":"Tiantian", // Tiantian Huanman
"deviceId":"xxxxxx" // 唯一 机器ID
}

返回
{
"code": "0",
"message": "success",
"data": {
"uncloseRate": 80, // 不能关闭的百分比
"adQuota": 19, // 剩余显示多少次广告
"region": "1", // (废弃)
"rapps": [
[
"org.hapjs.debugger", // 包名
"more package name..."
]
]
}
}

4. 壁纸

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
POST /api/v1/ad/wallpapers

请求
{
"adPlatform":"Vivo", // 平台 Oppo Xiaomi Huawei..
"businessCode":"Tiantian", // Tiantian Huanman
"deviceId":"xxxxxx" // 唯一 机器ID
}

返回
{
"code": "0",
"message": "success",
"data": {
"beauty": { // 分类 KEY
"categoryName": "女孩", // 分类名
"categoryCode": "beauty", // 分类 KEY
"resourceList": [
"https://....", // 图片 1
"https://...." // 图片 ...
]
},
"cat": { // 分类 KEY
"categoryName": "小猫", // 分类名
"categoryCode": "cat", // 分类 KEY
"resourceList": [
"https://....", // 图片 1
"https://...." // 图片 ...
]
}
}
}

5. 行为上报

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
POST /api/v1/action/report

请求
{
"adPlatform":"Vivo", // 平台 Oppo Xiaomi Huawei..
"businessCode":"Tiantian", // Tiantian Huanman
"adAction":"AdFinish", // 行为 AppEnter AppExit AdShow AdClick AdFinish
"deviceId":"xxxxxxx", // 唯一 机器ID
"vivoRequestId": "", // 回传点击数据时,透传给广告主的 RequestID
"vivoCreativeId": "", // 回传点击数据时,透传给广告主的 creativeId
"userId":"123", // 用户 id...(可同机器 ID)
"count":"1" // 固定 1
}

返回
{
"code": "0",
"message": "success",
"data": ""
}

如果您喜欢此博客或发现它对您有用,则欢迎对此发表评论。 也欢迎您共享此博客,以便更多人可以参与。 如果博客中使用的图像侵犯了您的版权,请与作者联系以将其删除。 谢谢 !