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': 'beforeActive', 'desc': '激活用户', 'group': 'User', 'url': 'webapp/index.php?c=User&a=beforeActive', 'params': [ _common.ReqHead(), ], 'response': [ _common.RspHead(), ['!before', [ ['hero','','英雄信息'],['gun','','枪械信息'],['bceg_max','','最高bceg'],['bceg','','实际bceg'] ],'转换前'], ['!after', [ ['hero','','英雄信息'],['gun','','枪械信息'],['ceg','','ceg'] ], '转换后'], ['cost', 0, '所需手续费'], ] },{ 'name': 'activate', 'desc': '激活用户(免费转NFT)', 'group': 'User', 'url': 'webapp/index.php?c=User&a=activate', 'params': [ _common.ReqHead(), ['hero_uniid', 0, '英雄唯一id'], ['gun_uniid', '', '枪械唯一id'], ], 'response': [ _common.RspHead(), ['!data', [ ['hero_id','','英雄id'],['gun_id','','枪械id'],['ceg','','ceg'] ], '激活成果'], ['property_chg', _common.PropertyChg(), '属性变更'], ] }, { '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, '跟新工会名称(可选参数,不传就不更新)'], ], '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': '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': 'like', 'desc': '点赞', 'group': 'User', 'url': 'webapp/index.php?c=User&a=like', 'params': [ _common.ReqHead(), ['target_id', '', '对方的account_id'] ], 'response': [ _common.RspHead(), ] },{ 'name': 'initRank', 'desc': '排位初始化段位', 'group': 'User', 'url': 'webapp/index.php?c=User&a=initRank', 'params': [ _common.ReqHead(), ], 'response': [ _common.RspHead(), ['property_chg', _common.PropertyChg(), '属性变更'], ] },{ 'name': 'selectFreeItem', 'desc': '选择免费英雄和武器', 'group': 'User', 'url': 'webapp/index.php?c=User&a=selectFreeItem', 'params': [ _common.ReqHead(), ['hero_id', '', '英雄 item id'], ['gun_id', '', '枪械 item id'] ], 'response': [ _common.RspHead(), ['property_chg', _common.PropertyChg(), '属性变更'], ] }, ]