# -*- coding: utf-8 -*- 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': 'activate', 'desc': '激活用户', 'group': 'User', 'url': 'webapp/index.php?c=User&a=activate', 'params': [ _common.ReqHead(), ['name', 0, '昵称'], ['sex', 0, '性别'], ['head_id', 0, '头像id'], ['head_frame', 0, '头像框'], ], 'response': [ _common.RspHead(), ['property_chg', _common.PropertyChg(), '属性变更'], ] }, { 'name': 'update', 'desc': '更新用户信息', 'group': 'User', 'url': 'webapp/index.php?c=User&a=update', 'params': [ _common.ReqHead(), ['hero_id', 0, '更新上阵英雄id(可选参数,不传就不更新)'], ['first_fight', 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(), '用户信息'], ] }, ] self.internalApis = [ { 'desc': '服务器战报(客户端不用处理)battleReport', 'group': 'User', 'url': 'webapp/index.php?c=User&a=battleReport', 'params': [ _common.ReqHead(), ['map_id', 0, '地图id'], ['map_tpl_name', '', '地图模板名'], ['room_uuid', 0, '房间唯一id'], ['map_name', '', '地图名'], ['game_time', 0, '游戏时间'], ['hurt', 0, '收到伤害'], ['rank', 0, '排名'], ['kills', 0, '击杀数'], ['harm', 0, '伤害输出'], ['add_HP', 0, '治疗'], ['alive_time', 0, '存活时间'], ['team_status', 0, '是否是组队状态'], ['snipe_kill', 0, '狙击枪击杀数'], ['rifle_kill', 0, '步枪击杀数'], ['pistol_kill', 0, '手枪击杀数'], ['submachine_kill', 0, '冲锋枪击杀数'], ['rescue_member', 0, '救起队友次数'], ['coin_num', 0, '金币'], ['rank_score', 0, '排位积分'], ['pass_score', 0, '通行证积分'], ['items', 0, '道具|分割'], ], 'response': [ _common.RspHead(), ['kill_his', 0, '历史最高击杀数'], ['alive_time_his', 0, '历史最高存活时间'], ['harm_his', 0, '历史最高伤害'], ['add_HP_his', 0, '历史最高治疗'], ] }, ]