game2006api/doc/BattleData.py
aozhiwei 7faf40c0a4 1
2024-08-02 09:30:35 +08:00

68 lines
2.6 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 BattleData(object):
def __init__(self):
self.apis = [
{
'method': 'POST',
'name': 'preBattleCheck',
'desc': '战前检查把CMJoin协议打包成json格式放到http body里参考gamelog处理方式(在发CMJoin之前发如果errcode!=0则提示错误并且不再发CMJoin相当于进入失败)',
'group': 'BattleData',
'url': 'webapp/index.php?c=BattleDataData&a=preBattleCheck',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['pre_battle_payload', '', '透传给战斗的CMJoin.pre_battle_payload(该信息里携带了战斗服需要校验的信息,防止客户端伪造数据)']
]
},{
'method': 'GET',
'name': 'getBattleHistory',
'desc': '历史战绩',
'group': 'BattleData',
'url': 'webapp/index.php?c=BattleDataData&a=getBattleHistory',
'params': [
_common.ReqHead(),
['room_mode', '', ' 0:pvp 1:pve'],
['pvp_mode', '', ' 0:匹配 1:排位']
],
'response': [
_common.RspHead(),
['!data', [_common.BattleHistory()], '战绩数据'],
]
},{
'method': 'GET',
'name': 'showBattleHistory',
'desc': '战绩详情',
'group': 'BattleData',
'url': 'webapp/index.php?c=BattleDataData&a=showBattleHistory',
'params': [
_common.ReqHead(),
['battle_uuid', '', ' 战斗唯一id'],
['room_uuid', '', ' 房间唯一id']
],
'response': [
_common.RspHead(),
['info', _common.BattleSettlement(), '战绩详情'],
]
},{
'method': 'GET',
'name': 'personalReport',
'desc': '个人战绩',
'group': 'BattleData',
'url': 'webapp/index.php?c=BattleDataData&a=personalReport',
'params': [
_common.ReqHead(),
['room_mode', '', ' 房间模式']
],
'response': [
_common.RspHead(),
['items', [], '战斗奖励'],
]
},
]