2019-07-11 19:56:24 +08:00
fix
2019-07-08 15:59:59 +08:00
2019-07-05 18:09:56 +08:00
2019-07-10 15:27:46 +08:00
2019-07-10 15:27:46 +08:00
2019-07-10 15:27:46 +08:00
fix
2019-07-08 15:59:59 +08:00
add
2019-07-10 10:50:35 +08:00
fix
2019-07-08 15:59:59 +08:00
2019-07-11 19:56:24 +08:00
2019-07-10 15:23:22 +08:00
2019-07-11 19:53:52 +08:00

推广系统接口文档

TODO

广告添加 own字段

返回所有广告[status] 返回单条广告 图片上传接口

1、获得公司列表

接口地址

http://192.168.100.20:8888/company

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

http://192.168.100.20:8888/company?status=0

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

{ "code": 200, "message": [ { "appid": "zpoHY37u", "appkey": "undefined", "contact": "miles", "id": "1006", "name": "kingsome", "status": 0, "tel": "17771" }, { "appid": "5bOaA82t", "appkey": "undefined", "contact": "miles", "id": "1007", "name": "kingsome", "status": 0, "tel": "17771" } ] }

2、新增公司信息

接口地址

http://192.168.100.20:8888/company

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

http://192.168.100.20:8888/company?name=kings&contact=pt&tel=1234

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

{ "code": 200 }

3、更改公司信息

接口地址

http://192.168.100.20:8888/company

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

http://192.168.100.20:8888/company?appid=zpoHY37u&appkey=undefined&contact=miles&id=1006&name=kingsome&status=1&tel=17771

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

{ "code": 200 }

4、删除公司信息

接口地址

http://192.168.100.20:8888/company

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

http://192.168.100.20:8888/company?id=1006

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

{ "code": 200 }

5、返回位置服务信息

接口地址

http://192.168.100.20:8888/location

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

http://192.168.100.20:8888/location

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

{ "code": 200, "message": [ { "area": 1, "gameid": 1003, "id": 1001, "type": 1 } ] }

6、添加位置服务信息

接口地址

http://192.168.100.20:8888/location

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

http://192.168.100.20:8888/location?area=1&type=1&gameid=1003

请求参数说明
名称 类型 必填 说明
area int 区域(1=首页2=游戏中3=结算页4=关闭)
type int 类型1=icon2=banner3=浮窗)
int 游戏ID
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

7、删除位置服务信息

接口地址

http://192.168.100.20:8888/location

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

http://192.168.100.20:8888/location?id=1002

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

{ "code": 200 }

8、添加广告信息

接口地址

http://192.168.100.20:8888/ad

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

http://192.168.100.20:8888/ad?name=abc&gameid=1003&locationid=1&ad_title=hello&ad_body=hi world&ad_image=http://1&ad_url=http://2&companyid=2

请求参数说明
名称 类型 必填 说明
name string 广告名称
gameid int 广告投放的游戏ID
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 广告提交公司
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

9、变更广告信息审批

接口地址

http://192.168.100.20:8888/ad

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

http://192.168.100.20:8888/ad?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
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 广告提交公司
返回参数说明
名称 类型 必填 说明
code int 返回状态
返回示例

{ "code": 200 }

10、删除广告信息

接口地址

http://192.168.100.20:8888/ad

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

http://192.168.100.20:8888/ad

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

{ "code": 200 }

11、返回广告列表信息

接口地址

http://192.168.100.20:8888/ad

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

http://192.168.100.20:8888/ad?id=1002

http://192.168.100.20:8888/ad?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 } }

Description
No description provided
Readme 720 KiB
Languages
Python 100%