97 lines
3.1 KiB
Python
97 lines
3.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Circuit(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'getCurrentStage',
|
|
'desc': '巡回赛当前阶段',
|
|
'group': 'Circuit',
|
|
'url': 'webapp/index.php?c=Circuit&a=getCurrentStage',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!info', [stageInfo()], '巡回赛当前阶段信息'],
|
|
]
|
|
},{
|
|
'name': 'getCircuitRanking',
|
|
'desc': '巡回赛排行',
|
|
'group': 'Circuit',
|
|
'url': 'webapp/index.php?c=Circuit&a=getCircuitRanking',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!rank_list', [rankingInfo()], '榜信息'],
|
|
['my_rank', rankingInfo(), '个人榜信息'],
|
|
]
|
|
},{
|
|
'name': 'getCircuitPhaseRanking',
|
|
'desc': '巡回赛阶段排行',
|
|
'group': 'Circuit',
|
|
'url': 'webapp/index.php?c=Circuit&a=getCircuitPhaseRanking',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!rank_list', [rankingInfo()], '榜信息'],
|
|
['my_rank', rankingInfo(), '个人榜信息'],
|
|
]
|
|
},{
|
|
'name': 'CircuitTaskList',
|
|
'desc': '巡回赛任务',
|
|
'group': 'Circuit',
|
|
'url': 'webapp/index.php?c=Circuit&a=CircuitTaskList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!list', [task()], '任务列表'],
|
|
]
|
|
},
|
|
]
|
|
|
|
|
|
|
|
|
|
class stageInfo(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['start_time', 0, '开始时间'],
|
|
['end_time', 0, '结束时间'],
|
|
['stage_cec_pool', 0, '当前阶段奖池'],
|
|
['total_cec_pool', 0, '赛季总奖池'],
|
|
]
|
|
|
|
class rankingInfo(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['account_id', 0, 'account'],
|
|
['name', 0, '名字'],
|
|
['head_id', 0, '头像'],
|
|
['head_frame', 0, '头像框'],
|
|
['hero_id', 0, '英雄ItemId'],
|
|
['skin_id', 0, '皮肤ItemId'],
|
|
['ranking', 0, '排名'],
|
|
['score', 0, '积分'],
|
|
['cec', 0, 'cec(个人榜信息才有)'],
|
|
]
|
|
|
|
class task(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['task_id', 0, '任务id'],
|
|
['current', 0, '当前进度'],
|
|
['target', 0, '目标进度'],
|
|
] |