promotion/ad_Readme.md
2019-09-29 13:54:45 +08:00

6.4 KiB
Raw Permalink Blame History

0、广告可用性检查

接口地址

http://spread-test.kingsome.cn/webapp/index.php

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

http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=selfChecking

请求参数说明
名称 类型 必填 说明
c string OPS通用接口标志
a string 方法定义 selfChecking
返回参数说明
名称 类型 必填 说明
errcode int 返回状态
errmsg string 错误信息
返回示例

{"errcode":0,"errmsg":"","healthy":1,"max_rundelay":10}

1、返回广告列表信息

接口地址
返回格式json
请求方式get
请求示范

http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=getAdList&body={"gameid":"10034","locationid":1001} http://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=getAdList&body={"gameid":"1003","area":1}

请求参数说明
名称 类型 必填 说明
c string OPS通用接口标志
a string 方法定义 当前为getAdList
body string 参数体JSON格式gameidchannelid,locationid作为key
返回参数说明
名称 类型 必填 说明
errcode int 返回状态
errmsg string 错误信息
ad_title string 广告标题
ad_body string 广告正文
ad_image string 广告图片
ad_sort int 播放优先级
adid int 广告标志ID用途数据上传统计
name string 广告名称
jump_status int 跳转状态1=跳转0=不跳
jump_param string 跳转参数
area string 区域(第一元素1=首页2=游戏中3=结算页4=关闭第二元素X轴第三元素Y轴其中X,Y取值范围0,15)如1,0,0代表首页左上
type int 类型1=icon2=banner3=浮窗)
mode int 广告单播或轮播模式1=单播2=轮播)
ad_property string 广告属性描述
返回示例

{ "errcode": 0, "errmsg": "", "message": { "totoal": 1, "result": [ { "ad_body": "", "ad_image": "https://resource.kingsome.cn/ad/b63dd2ca-dad5-11e9-9ea2-525400ddcafb_png", "ad_property": "{"is_shake":0,"is_hot":0,"is_new":0,"is_recommend":0,"appid":"wxdb103a128e118619","jump_param":"yx2nyabgm8","played":0}", "ad_sort": "0", "ad_title": "", "area": "3,8,12,0,32", "channelid": "6001", "companyid": "0", "createtime": "2019-09-20 10:42:42", "id": "1258", "jump_param": "", "jump_status": "1", "ld_property": "{"title":"底部横向滚动","show_name":"","bg_img":"","has_dot":false,"is_shake":false,"is_hide":true,"is_show_name":false,"related":[],"scale":1}", "locationid": "1073", "mode": "1", "name": "首页icon轮播+底部横向滚动6", "type": "6", "x": "8", "x_offset": "0", "y": "12", "y_offset": "32" }, ] } }

2、广告播放上报

接口地址

http://spread-test.kingsome.cn/webapp/index.php

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

上传列表压缩过程 ''' let aidStr = JSON.stringify(aids); let url = ${__getUrl()}?c=Ops&a=upAdRecording&adid=${encodeURIComponent(aidStr)} '''

https://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=upAdRecording&adid=%5B%221040%22%2C%221035%22%2C%221039%22%2C%221036%22%2C%221038%22%2C%221037%22%5D

请求参数说明
名称 类型 必填 说明
c string OPS通用接口标志
a string 方法定义 upAdRecording
adid int 广告ID
返回参数说明
名称 类型 必填 说明
errcode int 返回状态
errmsg string 错误信息
message string 返回信息
返回示例

{ "errcode": 0, "errmsg": "", "message": "1002 incr success!" }

3、广告跳转内容上报

接口地址

http://spread-test.kingsome.cn/webapp/index.php

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

body= { "gameid": 1001, "locationid": 1078, "uid": "miles.peng", "ad_channel": "ssfd1", "adid": 2234 }

https://spread-test.kingsome.cn/webapp/index.php?c=Ops&a=upJumpRecording

请求参数说明
名称 类型 必填 说明
c string OPS通用接口标志
a string 方法定义 upJumpRecording
gameid int 游戏ID
locationid int 广告位置ID
uid int 用户ID或微信openid
ad_channel int 广告特征码 见上ad_property.jump_param
adid int 广告ID
返回参数说明
名称 类型 必填 说明
errcode int 返回状态
errmsg string 错误信息
message string 返回信息
返回示例

{ "errcode": 0, "errmsg": "" }