57 lines
1.9 KiB
Python
57 lines
1.9 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': 'useItem',
|
|
'desc': '使用道具',
|
|
'group': 'Bag',
|
|
'url': 'webapp/index.php?c=Bag&a=useItem',
|
|
'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': '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(), '属性变更'],
|
|
]
|
|
},
|
|
]
|