79 lines
2.4 KiB
Python
79 lines
2.4 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'],
|
|
],
|
|
'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': 'startGame',
|
|
'desc': '开始游戏',
|
|
'group': 'Team',
|
|
'url': 'webapp/index.php?c=Team&a=startGame',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['team_uuid', '', '队伍唯一id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
]
|