187 lines
6.3 KiB
Python
187 lines
6.3 KiB
Python
# -*- coding: utf-8 -*-
|
||
|
||
import _common
|
||
|
||
class Team(object):
|
||
|
||
def __init__(self):
|
||
self.apis = [
|
||
{
|
||
'name': 'createTeam',
|
||
'desc': '创建队伍',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=createTeam',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['node_id', 0, '节点id'],
|
||
['map_id', 0, '地图id'],
|
||
['match_mode', 0, '0: 匹配赛模式 1: 排位赛 2: pve'],
|
||
['pve_instance_id', 0, 'pve副本id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'teamInfo',
|
||
'desc': '获取队伍信息',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=teamInfo',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['team_info', _common.TeamInfo(), '队伍信息'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'joinTeam',
|
||
'desc': '加入队伍',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=joinTeam',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'leaveTeam',
|
||
'desc': '离开队伍',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=leaveTeam',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},{
|
||
'name': 'breakup',
|
||
'desc': '解散队伍',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=breakup',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'name': 'kickout',
|
||
'desc': '踢人',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=kickout',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
['target_id', '', '目标account_id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'name': 'handover',
|
||
'desc': '转移队长职位',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=handover',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
['target_id', '', '目标account_id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'name': 'cancel',
|
||
'desc': '取消游戏开始',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=cancel',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
{
|
||
'name': 'startGame',
|
||
'desc': '开始游戏',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=startGame',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},{
|
||
'name': 'doReady',
|
||
'desc': '准备/取消',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=doReady',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
['ready_state', 0, '1:准备 0:取消'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},{
|
||
'name': 'updateTeam',
|
||
'desc': '跟新队伍信息',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=updateTeam',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},{
|
||
'name': 'permission',
|
||
'desc': '邀请许可',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=permission',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
['target_id', '', '目标account_id'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},{
|
||
'name': 'setCustomInfo',
|
||
'desc': '设置队伍自定义房间',
|
||
'group': 'Team',
|
||
'url': 'webapp/index.php?c=Team&a=setCustomInfo',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['team_uuid', '', '队伍唯一id'],
|
||
['custom_room_id', '', '自定义房间的ID'],
|
||
['custom_room_state', '', '自定义房间的状态'],
|
||
['custom_room_pwd', '', '自定义房间的密码'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
]
|
||
},
|
||
]
|