game2006api/doc/Hero.py
aozhiwei 38ac413eaf 1
2022-06-14 16:31:02 +08:00

153 lines
5.3 KiB
Python

# -*- coding: utf-8 -*-
import _common
class Hero(object):
def __init__(self):
self.apis = [
{
'name': 'heroList',
'desc': '获取英雄列表',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=heroList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!hero_list', [_common.Hero()], '英雄列表']
]
},
{
'name': 'skinList',
'desc': '获取英雄皮肤列表',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=skinList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!skin_list', [_common.HeroSkin()], '英雄皮肤列表']
]
},
{
'name': 'takeonSkin',
'desc': '穿戴皮肤',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=takonSkin',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
['skin_id', 0, '皮肤id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'upgradeSkill',
'desc': '升技能',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeSkill',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'upgradeLevel',
'desc': '升等级',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeLevel',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
['slot_id', 0, '槽id(0-1)'],
['cost_item_id', 0, '支付方式'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'getUpgradeLevelList',
'desc': '获取升级中的英雄列表',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=getUpgradeLevelList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!infos', [_common.LevelingHero()], '升级中的英雄列表'],
]
},
{
'name': 'upgradeQuality',
'desc': '升阶',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeQuality',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
['slot_id', 0, '槽id(0-1)'],
['cost_hero_uniid', 0, '耗材英雄唯一id'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'upgradeQualityPreview',
'desc': '升阶',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeQualityPreview',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
['cost_hero_uniid', 0, '耗材英雄唯一id'],
],
'response': [
_common.RspHead(),
['old_hero', _common.Hero(), '英雄-老'],
['new_hero', _common.Hero(), '英雄-新'],
]
},
{
'name': 'getUpgradeQualityList',
'desc': '获取升阶中的英雄列表',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=getUpgradeQualityList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!infos', [_common.QualityingHero()], '升阶中的英雄列表'],
]
},
{
'name': 'receive',
'desc': '领取升级/升阶英雄',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=receive',
'params': [
_common.ReqHead(),
['type', 0, '1:领取升级 2:领取升阶'],
['hero_uniid', 0, '英雄唯一id'],
],
'response': [
_common.RspHead(),
['old_hero', _common.Hero(), '英雄-老'],
['new_hero', _common.Hero(), '英雄-新'],
]
},
]