111 lines
3.3 KiB
Python
111 lines
3.3 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()], '任务列表'],
|
||
['pass_buy_state', 0, '通行证购买状态 1:购买中'],
|
||
['pass_price', 0, '通行证价格'],
|
||
['lv_buy_state', 0, '通行证经验购买状态 1:购买中'],
|
||
['lv_price', 0, '通行证经验价格(exp/price)'],
|
||
]
|
||
},{
|
||
'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(), '属性变更'],
|
||
]
|
||
},{
|
||
'name': 'buyPlatinumPass',
|
||
'desc': '购买通行证',
|
||
'group': 'Pass',
|
||
'url': 'webapp/index.php?c=Pass&a=buyPlatinumPass',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['price', 0, '价格'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', 0, '订单号'],
|
||
['params', 0, 'params'],
|
||
]
|
||
},{
|
||
'name': 'buyLevel',
|
||
'desc': '购买通行证经验',
|
||
'group': 'Pass',
|
||
'url': 'webapp/index.php?c=Pass&a=buyLevel',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['level', 0, '等级'],
|
||
['price', 0, '价格'],
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['trans_id', 0, '订单号'],
|
||
['params', 0, 'params'],
|
||
]
|
||
},
|
||
|
||
]
|
||
|
||
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, '结束时间'],
|
||
] |