2019-07-05 18:09:56 +08:00
2019-07-12 17:34:37 +08:00
2019-09-19 17:41:36 +08:00
2019-09-19 17:41:36 +08:00
2019-09-30 10:41:41 +08:00
2019-10-29 19:34:04 +08:00
add
2019-07-10 10:50:35 +08:00
2019-10-30 16:24:18 +08:00
2019-09-29 13:54:45 +08:00
2019-09-29 11:47:47 +08:00
2019-09-10 14:29:09 +08:00
2019-09-29 11:47:47 +08:00
2019-09-24 20:51:01 +08:00
2019-07-12 09:44:25 +08:00
2019-09-10 13:57:32 +08:00
2019-09-10 15:02:43 +08:00
2019-10-11 10:53:14 +08:00
2019-09-29 17:12:39 +08:00
a
2021-06-02 10:21:17 +08:00
2019-07-16 11:30:53 +08:00
2019-09-26 14:51:02 +08:00

推广系统接口文档

TODO

区域/类型 增删改检查的接口

1、获得公司列表

接口地址

http://154.8.214.202:6015/interface/company

返回格式json
请求方式get
请求示范

http://154.8.214.202:6015/company

http://154.8.214.202:6015/interface/company?status=0

请求参数说明
名称 类型 必填 说明
status int 0=未审批1=审批通过2=审批未通过
id int 返回该id对应公司信息
上述参数为空返回所有信息
返回参数说明
名称 类型 必填 说明
id int 自动产生的公司ID
name string 公司名称
contact string 联系人
user string 登录账号
tel int 联系电话
companyid string 公司标识
companykey string 用于API认证
返回示例

{ "code": 200, "message": [ { "appid": "BKadJbmZ", "appkey": "undefined", "contact": "pt", "id": "1001", "name": "kings", "status": 0, "tel": "1234", "user": "None" } ] }

2、新增公司信息

接口地址

http://154.8.214.202:6015/interface/company

返回格式json
请求方式post
请求示范

http://154.8.214.202:6015/interface/company?name=kings&contact=pt&tel=1234

请求参数说明
名称 类型 必填 说明
name string 公司名称
contact string 联系人
tel string 联系电话
user string 登录账号
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

3、更改公司信息

接口地址

http://154.8.214.202:6015/interface/company

返回格式json
请求方式put
请求示范

http://154.8.214.202:6015/interface/company?appid=zpoHY37u&appkey=undefined&contact=miles001&id=1006&name=kingsome&status=1&tel=17771&user=assd

请求参数说明
名称 类型 必填 说明
name string 公司名称
contact string 联系人
tel string 联系电话
user string 登录账号
id int 公司id(唯一值)
appid string 公司标识
appkey string 认证用,暂无
status int 审批状态
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

4、删除公司信息

接口地址

http://154.8.214.202:6015/interface/company

返回格式json
请求方式delete
请求示范

http://154.8.214.202:6015/interface/company?id=1006

请求参数说明
名称 类型 必填 说明
id int 公司id(唯一值)
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

5、返回位置服务信息

接口地址

http://154.8.214.202:6015/interface/location

返回格式json
请求方式get
请求示范

http://154.8.214.202:6015/interface/location?gameid=1001

请求参数说明
名称 类型 必填 说明
gameid int 游戏ID
channelid int 渠道ID默认是6001
返回参数说明
名称 类型 必填 说明
code int 返回状态
message json 所有位置信息
返回示例

{ "code": 200, "message": [ { "area": "1,8,15,0,0", "channelid": 6001, "gameid": 1004, "id": 1007, "mode": 1, "type": 2 } ] }

6、添加位置服务信息

接口地址

http://154.8.214.202:6015/interface/location

返回格式json
请求方式post
请求示范

http://154.8.214.202:6015/interface/location?gameid=1001&area=3&type=1&mode=2&x=2&y=2&x_offset=4&y_offset=5&channelid=6001&id_property={"a":1,"b":2}

请求参数说明
名称 类型 必填 说明
area string 区域(支持多值,表明页面位置
x int X轴坐标
y int y轴坐标
x_offset int X坐标偏移量
y_offset int Y坐标偏移量
type int 类型1=icon2=banner3=浮窗)
mode int 广告单播或轮播模式1=单播2=轮播)
gameid int 游戏ID
channelid int 渠道ID
ld_propert string 位置的属性
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

7、变更位置服务信息

接口地址

http://154.8.214.202:6015/interface/location

返回格式json
请求方式put
请求示范

http://154.8.214.202:6015/interface/location?gameid=1001&area=3&type=1&mode=2&x=2&y=2&x_offset=4&y_offset=5&id=1004&channelid=6001&ld_property={"a":1,"b":2}&in_used=1

请求参数说明
名称 类型 必填 说明
area string 区域(支持多值,表明页面位置
x int X轴坐标
y int y轴坐标
x_offset int X坐标偏移量
y_offset int Y坐标偏移量
type int 类型1=icon2=banner3=浮窗)
mode int 广告单播或轮播模式1=单播2=轮播)
gameid int 游戏ID
channelid int 渠道ID
in_used int 是否使用默认为1
ld_propert string 位置的属性
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

8、删除位置服务信息

接口地址

http://154.8.214.202:6015/interface/location

返回格式json
请求方式delete
请求示范

http://154.8.214.202:6015/interface/location?id=1004

请求参数说明
名称 类型 必填 说明
id int 需删除的位置ID
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

9、添加广告信息

接口地址

http://154.8.214.202:6015/interface/prometion

返回格式json
请求方式post
请求示范

http://154.8.214.202:6015/interface/promotion?name=abc&gameid=1003&locationid=1007&ad_title=hello&ad_body=hi world&ad_image=http://1&ad_url=http://2&companyid=2&ad_property={is_shake:1}&jump_status=1

请求参数说明
名称 类型 必填 说明
name string 广告名称
gameid int 广告投放的游戏ID
channelid int 渠道ID默认是6001 NEW
locationid int 位置ID通过该ID到localtion表中获得areatypemode信息
ad_title string 广告标题
ad_body string 广告正文
ad_image string 头像链接
ad_url string 跳转链接
begin_time datetime 开始时间默认是1999-01-01
end_time datetime 结束时间默认是3000-01-01
ad_num int 投放次数默认是0(次数无限)
ad_sort int 优先级默认为0
status int 默认为0未审批1=审批通过2=审批未通过3=暂停
companyid int 广告提交公司
ad_property json 广告属性描述
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

10、变更广告信息审批

接口地址

http://154.8.214.202:6015/interface/promotion

返回格式json
请求方式put
请求示范

http://154.8.214.202:6015/interface/promotion?name=abc&gameid=1003&locationid=1&ad_title=hello&ad_body=hi world&ad_image=http://1&ad_url=http://2&begin_time=2019-06-01&end_time=2019-12-01&ad_num=300&ad_sort=1&status=1&id=1001&companyid=2

请求参数说明
名称 类型 必填 说明
id int 广告ID
name string 广告名称
gameid int 广告投放的游戏ID
channelid int 渠道ID默认是6001 NEW
locationid int 位置ID
ad_title string 广告标题
ad_body string 广告正文
ad_image string 头像链接
ad_url string 跳转链接
begin_time datetime 开始时间默认是1999-01-01
end_time datetime 结束时间默认是3000-01-01
ad_num int 投放次数,默认是-1(无限)
ad_sort int 优先级默认为0
status int 默认为0未审批1=审批通过2=审批未通过3=暂停
companyid int 广告提交公司
ad_property json 广告属性描述
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

11、删除广告信息实际将status 改为4

接口地址

http://154.8.214.202:6015/interface/promotion

返回格式json
请求方式delete
请求示范

http://154.8.214.202:6015/interface/promotion

请求参数说明
名称 类型 必填 说明
id int 需删除的位置ID
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

12、返回广告列表信息

接口地址

http://154.8.214.202:6015/interface/promotion

返回格式json
请求方式get
请求示范

http://154.8.214.202:6015/interface/promotion?id=1002

http://154.8.214.202:6015/interface/promotion?companyid=0

http://154.8.214.202:6015/interface/promotion?status=0

请求参数说明
名称 类型 必填 说明
id int 广告ID其优先级高于其他参数
companyid int 公司ID优先级高于status
status int 审批状态,都不填写返回所有广告信息
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200, "message": { "ad_body": "hi world", "ad_image": "http://1", "ad_num": 300, "ad_sort": 1, "ad_title": "hello", "ad_url": "http://2", "begin_time": "Sat, 01 Jun 2019 00:00:00 GMT", "end_time": "Sun, 01 Dec 2019 00:00:00 GMT", "id": 1002, "name": "abc", "status": 0 } }

{ "code": 200, "message": { "ad_body": "hi world", "ad_image": "http://1", "ad_num": 300, "ad_sort": 1, "ad_title": "hello", "ad_url": "http://2", "begin_time": "Sat, 01 Jun 2019 00:00:00 GMT", "end_time": "Sun, 01 Dec 2019 00:00:00 GMT", "id": 1002, "name": "abc", "status": 0 } }

ad_channel 获得接口

http://mp.kingsome.cn/api/open/promotion/get-uid?game_id=8002&platform_id=6001

12、刷新AD缓存接口

接口地址

http://154.8.214.202:6015/interface/reflush_adinfo

返回格式json
请求方式get
请求示范

http://154.8.214.202:6015/interface/reflush_adinfo

请求参数说明
名称 类型 必填 说明
id int 广告ID其优先级高于其他参数
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200, "message": "reflush AD cache success!" }

Description
No description provided
Readme 720 KiB
Languages
Python 100%