60 lines
1.7 KiB
Python
60 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Star(object):
|
|
|
|
def __init__(self):
|
|
self.apis_ = [
|
|
{
|
|
'desc': 'getList',
|
|
'group': 'Star',
|
|
'url': 'webapp/index.php?c=Star&a=getList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['countdown', 0, '赛季结束时间'],
|
|
['!data', [Task()], '任务列表'],
|
|
]
|
|
},{
|
|
'desc': 'commit',
|
|
'group': 'Star',
|
|
'url': 'webapp/index.php?c=Star&a=commit',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},{
|
|
'desc': 'commitAll',
|
|
'group': 'Star',
|
|
'url': 'webapp/index.php?c=Star&a=commitAll',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},
|
|
|
|
]
|
|
|
|
|
|
class Task(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['mission_id', 0, '任务id'],
|
|
['current', 0, '任务进度-当前'],
|
|
['target', 0, '任务进度-目标'],
|
|
['state', 0, '任务状态 0:任务已完成-可领取奖励 1:任务已完成-已领取奖励 -1:任务进行中-未完成(不可领取)'],
|
|
]
|