2024-10-09 16:52:06 +08:00

113 lines
4.2 KiB
Python

# -*- coding: utf-8 -*-
import _common
class Bag(object):
def __init__(self):
self.apis = [
{
'name': 'itemList',
'desc': '获取背包物品列表',
'group': 'Bag',
'url': 'webapp/index.php?c=Bag&a=itemList',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!item_list', [_common.Item()], '物品列表']
]
},
{
'name': 'useItemS',
'desc': '使用道具',
'group': 'Bag',
'surl': 'webapp/index.php?c=Bag&a=useItemS',
'params': [
_common.ReqHead(),
['item_id', 0, '道具唯一id'],
['item_num', 0, '道具数量'],
['param1', '', '参数1(当使用的是改名卡时param1=新的角色名)'],
['param2', '', '参数2(当使用的是改名卡时param2=签名)'],
['param3', '', '参数3'],
],
'response': [
_common.RspHead(),
['award', _common.Award(), '奖励信息'],
['property_chg', _common.PropertyChg(), '属性变更'],
]
},{
'name': 'openBoxByBindGoldS',
'desc': '绑币开宝箱',
'group': 'Bag',
'surl': 'webapp/index.php?c=Bag&a=openBoxByBindGoldS',
'params': [
_common.ReqHead(),
['item_id', 0, '道具唯一id'],
['item_num', 0, '道具数量'],
],
'response': [
_common.RspHead(),
['award', _common.Award(), '奖励信息'],
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'rename',
'desc': '改名(优先扣改名卡没有则扣钻石)',
'group': 'Bag',
'url': 'webapp/index.php?c=Bag&a=rename',
'params': [
_common.ReqHead(),
['name', '', '新的角色名'],
['name_sign', '', '名字签名)'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'buyItemS',
'desc': '购买道具(目前只一次购买改名卡)',
'group': 'Bag',
'surl': 'webapp/index.php?c=Bag&a=buyItemS',
'params': [
_common.ReqHead(),
['item_id', '', '道具id'],
['item_num', '', '道具数量'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},{
'name': 'syntheticGold',
'desc': '金币合成',
'group': 'Bag',
'url': 'webapp/index.php?c=Bag&a=syntheticGold',
'params': [
_common.ReqHead(),
['item_id', '', '合成的道具id'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},{
'name': 'resolveGolds',
'desc': '金砖拆解',
'group': 'Bag',
'url': 'webapp/index.php?c=Bag&a=resolveGolds',
'params': [
_common.ReqHead(),
['item_uniid', '', '道具uniid'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
]