有能力的人,用来写网站、小程序、APP都是可以的
一、英雄列表
用于获取所有的英雄列表,一般用于查看全部英雄,随着官方缓慢更新ing
https://www.sapi.run/hero/herolist.json
官方的接口 https://pvp.qq.com/web201605/js/herolist.json
二、战力查询
1、JSON版
常规接口,返回json格式,code==200
都是正常结果,不然就是错误结果,注意区分处理
接口: https://www.sapi.run/hero/select.php
参数: hero:英雄名字 type:aqq、awx、iqq、iwx
DEMO
示例: https://www.sapi.run/hero/select.php?hero=孙悟空&type=aqq
返回结果
{
"code": 200,
"data": {
"uid": "167",
"name": "孙悟空",
"alias": "齐天大圣-孙悟空",
"platform": "安卓-扣扣区",
"photo": "https://game.gtimg.cn/images/yxzj/img201606/heroimg/167/167.jpg",
"area": "沈河区",
"areaPower": "3260",
"city": "营口市",
"cityPower": "4682",
"province": "上海市",
"provincePower": "6184",
"guobiao": "9706",
"stamp": "1658814232",
"updatetime": "2022/07/26 13:43:52",
"clientIP": "127.0.0.0"
},
"msg": "若无杀父之仇 请勿攻击本站"
}
结果里面包含了最低省标、市标、县标、国标,以及英雄头像
2、图片版
返回图片,可以直接发送;内置20种卡片可选
接口: https://www.sapi.run/pic/getHero.php
参数:
hero:英雄名字
type:aqq、awx、iqq、iwx
card:1~20 (非必填,不填默认随机)
format:json、png (非必填)
DEMO
例如:
https://www.sapi.run/pic/getHero.php?hero=孙悟空&type=iqq&format=json&card=2
返回结果
{
"code": 200,
"data": "https://www.sapi.run/pic/images/temp/20.png",
"msg": "请求成功"
}
官方素材
英雄小头像(100x100) https://game.gtimg.cn/images/yxzj/img201606/heroimg/英雄代码/英雄代码.jpg
例如 https://game.gtimg.cn/images/yxzj/img201606/heroimg/109/109.jpg
英雄小头像(184x184)
https://game.gtimg.cn/images/yxzj/act/a20160510story/relavance/heroes/hero数字.jpg
例如 https://game.gtimg.cn/images/yxzj/act/a20160510story/relavance/heroes/hero109.jpg
英雄详情按钮(224x69)
https://game.gtimg.cn/images/yxzj/img201606/heroimg/英雄代码/英雄代码-freehover.png
例如 https://game.gtimg.cn/images/yxzj/img201606/heroimg/109/109-freehover.png
英雄海报(1920x880)
https://game.gtimg.cn/images/yxzj/img201606/skin/hero-info/英雄代码/英雄代码-bigskin-皮肤个数.jpg
例如 https://game.gtimg.cn/images/yxzj/img201606/skin/hero-info/109/109-bigskin-1.jpg
英雄海报(1200x530)
https://game.gtimg.cn/images/yxzj/img201606/heroimg/英雄代码/英雄代码-bigskin-皮肤个数.jpg
例如 https://game.gtimg.cn/images/yxzj/img201606/heroimg/109/109-bigskin-1.jpg