78 lines
2.1 KiB
Python
78 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Pass(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'getPassList',
|
|
'desc': '成长任务列表',
|
|
'group': 'Pass',
|
|
'url': 'webapp/index.php?c=Pass&a=getPassList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!time_info', [TimeInfo()], '赛季时间'],
|
|
['!reward_info', [Reward()], '任务列表'],
|
|
]
|
|
},{
|
|
'name': 'commit',
|
|
'desc': '领取任务',
|
|
'group': 'Pass',
|
|
'url': 'webapp/index.php?c=Pass&a=commit',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['level', 0, '等级'],
|
|
['type', 0, '0:普通奖励 1:白金奖励'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},{
|
|
'name': 'commitAll',
|
|
'desc': '全部领取',
|
|
'group': 'Pass',
|
|
'url': 'webapp/index.php?c=Pass&a=commitAll',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},
|
|
|
|
]
|
|
|
|
class Reward(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['!basic', [RewardInfo()], '普通奖励'],
|
|
['!platinum', [RewardInfo()], '白金奖励'],
|
|
]
|
|
|
|
class RewardInfo(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['level', 0, '等级'],
|
|
['state', 0, '0:可领取奖励 1:已领取奖励 -1:(不可领取)'],
|
|
]
|
|
|
|
class TimeInfo(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['name', 0, '标题'],
|
|
['sub_name', 0, '副标题'],
|
|
['begin_time', 0, '开始时间'],
|
|
['end_time', 0, '结束时间'],
|
|
] |