game2006api/doc/Gun.py
hujiabin d49e7e9e48 1
2022-09-08 16:41:30 +08:00

158 lines
5.6 KiB
Python

# -*- coding: utf-8 -*-
import _common
class Gun(object):
def __init__(self):
self.apis = [
{
'name': 'skinList',
'desc': '获取枪械皮肤列表',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=skinList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!skin_list', [_common.GunSkin()], '枪械皮肤列表']
]
},
{
'name': 'talentList',
'desc': '获取枪械天赋列表',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=talentList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!talent_list', [_common.GunTalent()], '枪械天赋列表']
]
},
{
'name': 'upgradeTalentLv',
'desc': '升级枪械天赋等级',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=upgradeTalentLv',
'params': [
_common.ReqHead(),
['talent_id', 0, '天赋id'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'gunList',
'desc': '获取枪械列表',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=gunList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!gun_list', [_common.Gun()], '枪械列表']
]
},
{
'name': 'upgradeLevel',
'desc': '升等级',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=upgradeLevel',
'params': [
_common.ReqHead(),
['gun_uniid', 0, '枪械唯一id'],
['slot_id', 0, '槽id(0-1)'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'upgradeLevelPreview',
'desc': '升等级',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=upgradeLevelPreview',
'params': [
_common.ReqHead(),
['gun_uniid', 0, '枪械唯一id'],
],
'response': [
_common.RspHead(),
['old_gun', _common.Gun(), '枪械-老'],
['new_gun', _common.Gun(), '枪械-新'],
['cost', _common.Cost(), '所需费用'],
]
},
{
'name': 'upgradeQuality',
'desc': '升阶',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=upgradeQuality',
'params': [
_common.ReqHead(),
['gun_uniid', 0, '枪械唯一id'],
['cost_hero_uniid', 0, '耗材英雄唯一id'],
['slot_id', 0, '槽id(0-1)'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'upgradeQualityPreview',
'desc': '升阶',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=upgradeQualityPreview',
'params': [
_common.ReqHead(),
['gun_uniid', 0, '枪械唯一id'],
['cost_gun_uniid', 0, '耗材枪械唯一id'],
],
'response': [
_common.RspHead(),
['old_gun', _common.Gun(), '枪械-老'],
['new_gun', _common.Gun(), '枪械-新'],
['cost', _common.Cost(), '所需费用'],
]
},
{
'name': 'receive',
'desc': '获取升级、升阶后的武器',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=receive',
'params': [
_common.ReqHead(),
['type', 0, '1:领取升级 2:领取升阶'],
['gun_uniid', 0, '枪械唯一id'],
],
'response': [
_common.RspHead(),
['state', 0, '0:失败 1:成功'],
['old_hero', _common.Gun(), '枪械-老'],
['new_hero', _common.Gun(), '枪械-新'],
]
},
{
'name': 'gunDetails',
'desc': '武器详情',
'group': 'Gun',
'url': 'webapp/index.php?c=Gun&a=gunDetails',
'params': [
_common.ReqHead(),
['unique_id', 0, '枪械唯一id'],
],
'response': [
_common.RspHead(),
['!data', [_common.Gun()], '枪械信息']
]
},
]