239 lines
9.0 KiB
Python
239 lines
9.0 KiB
Python
import _common
|
|
|
|
class User(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'login',
|
|
'desc': '登录',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=login',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserInfo(), '用户信息']
|
|
]
|
|
},
|
|
{
|
|
'name': 'nameExists',
|
|
'desc': '名字是否已被用',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=nameExists',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['name', 0, '名字'],
|
|
['name_sign', '', '名字签名'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'update',
|
|
'desc': '更新用户信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=update',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['sex', 0, '更新性别(可选参数,不传就不更新)'],
|
|
['head_id', 0, '更新头像(可选参数,不传就不更新)'],
|
|
['head_frame', 0, '更新头像框(可选参数,不传就不更新)'],
|
|
['hero_id', 0, '更新上阵英雄唯一id(可选参数,不传就不更新)'],
|
|
['first_fight', 0, '更新首次战斗(可选参数,不传就不更新)'],
|
|
['already_guide', 0, '已引导(可选参数,不传就不更新)'],
|
|
['guild_id', 0, '跟新工会id(可选参数,不传就不更新)'],
|
|
['guild_job', 0, '跟新工会职位(可选参数,不传就不更新)'],
|
|
['guild_name', 0, '跟新工会名称(可选参数,不传就不更新)'],
|
|
['parachute', 0, '跟新降落伞(可选参数,不传就不更新)'],
|
|
['ring_id', 0, '跟新戒指(可选参数,不传就不更新)'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'info',
|
|
'desc': '获取用户信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=info',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['target_id', '', '用户account_id(如果要获取自己的就传自己的account_id)']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserInfo(), '用户信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'getBattleInfo',
|
|
'desc': '获取用户战斗信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=getBattleInfo',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserBattleInfo(), '用户战斗信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'query',
|
|
'desc': '通过名字查询用户信息(精准查询)',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=query',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['name', '', '角色名']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserInfo(), '用户信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'detailInfo',
|
|
'desc': '获取用户信息(详细)',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=detailInfo',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['target_id', '', '用户account_id(如果要获取自己的就传自己的account_id)']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserDetailInfo(), '用户信息(详细)'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'chartInfo',
|
|
'desc': '用户五维图信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=chartInfo',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['target_id', '', '用户account_id(如果要获取自己的就传自己的account_id)']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['pvpInfo',_common.UserChartInfo(), '4v4数据'],
|
|
['mobaInfo',_common.UserChartInfo(), 'moba数据'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'like',
|
|
'desc': '点赞',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=like',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['target_id', '', '对方的account_id']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'getFreeItemList',
|
|
'desc': '获取免费英雄和武器列表',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=getFreeItemList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!data', [], '列表'],
|
|
]
|
|
},{
|
|
'name': 'selectFreeItemS',
|
|
'desc': '获取免费英雄和武器列表',
|
|
'group': 'User',
|
|
'surl': 'webapp/index.php?c=User&a=selectFreeItemS',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['itemId', 0, '英雄itemId'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!data', [], 'item'],
|
|
]
|
|
},
|
|
{
|
|
'method': 'POST',
|
|
'name': 'updateAddressBind',
|
|
'desc': '更新钱包绑定信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=updateAddressBind',
|
|
'is_json_params': True,
|
|
'request_params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'params': [
|
|
['jwt', '', 'jwt数据'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['is_retry', 0, '是否重试 0:不用重试 1:重试'],
|
|
['retry_time', 0, '重试时间(单位秒)'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'setUserHonor',
|
|
'desc': '设置用户荣誉',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=setUserHonor',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['token_type', '', '类型(目前只有一个类型:6)'],
|
|
['state', '', '1:佩戴 0:取消'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},{
|
|
'name': 'getUserGameTimes',
|
|
'desc': '获取用户游戏场次',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=getUserGameTimes',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['target_id', '', 'account_id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['data', 0, '游戏场次'],
|
|
]
|
|
},{
|
|
'name': 'refreshUserInfo',
|
|
'desc': '刷新用户信息',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=refreshUserInfo',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info',_common.UserInfo(), '用户信息'],
|
|
]
|
|
},{
|
|
'name': 'getUserVip',
|
|
'desc': '用户VIP',
|
|
'group': 'User',
|
|
'url': 'webapp/index.php?c=User&a=getUserVip',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['vip',0, 'vip等级'],
|
|
['exp',0, 'vip经验'],
|
|
]
|
|
},
|
|
]
|