game2006api/doc/Role.py
2021-11-23 15:59:18 +08:00

219 lines
7.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
import _common
class Role(object):
def __init__(self):
self.apis = [
{
'desc': '获取角色信息roleInfo',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=roleInfo',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
_common.RoleInfo(),
]
},
{
'desc': '客户端战报clientBattleReport',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=clientBattleReport',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
]
},
{
'desc': '服务器战报(客户端不用处理)battleReport',
'group': 'Role',
'url': 'webapp/index.php?c=Role&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, '历史最高治疗'],
]
},
{
'desc': '获取机器人信息getRobotInfo',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=getRobotInfo',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!member_list', _common.RobotInfo(), '机器人数据'],
['!sin_member', _common.RobotMetaInfo(), '机器人列表'],
['num', 0, '货币数量'],
]
},
{
'desc': '获取战斗奖励getFightReward',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=getFightReward',
'params': [
_common.ReqHead(),
['coin_num', 0, '货币数量'],
['reward_id', 0, '奖励id'],
['reward_num', 0, '奖励数量'],
],
'response': [
_common.RspHead(),
['coin_num', 0, '货币数量'],
]
},
{
'desc': '获取新手奖励getNewHandReward',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=getNewHandReward',
'params': [
_common.ReqHead(),
['type', 0, '类型1或2'],
],
'response': [
_common.RspHead(),
['!item_list', _common.DropItemInfo, '掉落道具列表'],
['coin_num', 0, '当前金币数'],
['rmb_num', 0, '当前点券数量'],
['!all_item_list', _common.RewardItemInfo, '实际奖励的道具列表'],
]
},
{
'desc': '兑换货币(该接口存在争议)exchangeCoin',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=exchangeCoin',
'params': [
_common.ReqHead(),
['id', 0, '装备?货币id'],
['num', 0, '兑换数量'],
],
'response': [
_common.RspHead(),
]
},
{
'desc': '保存新手引导saveNewbie',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=saveNewbie',
'params': [
_common.ReqHead(),
['id', 0, 'id'],
],
'response': [
_common.RspHead(),
]
},
{
'desc': '获取战斗装备(该函数存在刷道具风险)getFightEquip',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=getFightEquip',
'params': [
_common.ReqHead(),
['id', 0, 'id'],
],
'response': [
_common.RspHead(),
['!item_list', _common.DropItemInfo, '掉落道具列表'],
['!all_item_list', _common.RewardItemInfo, '实际奖励的道具列表'],
]
},
{
'desc': '获取金币数updateMoney',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=updateMoney',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['data', [
['coin_num', 0, '金币数']
], '数据']
]
},
{
'desc': '获取金币和点券数updateMoneyAndLottery',
'group': 'Role',
'url': 'webapp/index.php?c=Role&a=updateMoneyAndLottery',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['data', [
['coin_num', 0, '金币数'],
['rmb', 0, '点券数']
], '数据']
]
},
{
'desc': 'getPlayerInfo',
'group': 'NPlayerInfo',
'url': 'webapp/index.php?c=NPlayerInfo&a=getPlayerInfo',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
]
},
{
'desc': '修改头像框信息changeHIFrameHero',
'group': 'NPlayerInfo',
'url': 'webapp/index.php?c=NPlayerInfo&a=changeHIFrameHero',
'params': [
_common.ReqHead(),
['type', 0, '类型 2:头像 3头像框 4:英雄'],
['itemID', 0, ''],
],
'response': [
_common.RspHead(),
]
},
{
'desc': '修改昵称changeName',
'group': 'NPlayerInfo',
'url': 'webapp/index.php?c=NPlayerInfo&a=changeName',
'params': [
_common.ReqHead(),
['nickName', '', '新昵称'],
],
'response': [
_common.RspHead(),
['data', '', '新昵称'],
]
},
]