161 lines
6.7 KiB
Python
161 lines
6.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Mission(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'missionList',
|
|
'desc': '获取任务列表',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=missionList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['type', 0, '任务类型(!!!注意这里的类型和任务表里的任务不是一回事) 1:每日任务 2:赛季周任务 3:悬赏任务'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['current_day_active_value', 0, '当前日活跃度'],
|
|
['current_week_active_value', 0, '当前周活跃度'],
|
|
['day_active_limit', 0, '每日活跃度上限'],
|
|
['week_active_limit', 0, '每周活跃度上限'],
|
|
['day_time_end', 0, '每日活动结算时间'],
|
|
['week_time_end', 0, '每周活动结算时间'],
|
|
['!mission_list1', [_common.Mission()], '任务列表1'],
|
|
['!mission_list2', [_common.Mission()], '任务列表2'],
|
|
['refreshInfo', RefreshInfo(), '刷新任务信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'sendOfferRewardMission',
|
|
'desc': '派遣悬赏任务',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=sendOfferRewardMission',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
['objects', '', '悬赏任务对象列表type:id|']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'cancelOfferRewardMission',
|
|
'desc': '撤销派遣悬赏任务',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=cancelOfferRewardMission',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'boostOfferRewardMissionPreview',
|
|
'desc': '加速悬赏任务',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=boostOfferRewardMissionPreview',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['boost_chg', 0, '加速所需ceg'],
|
|
]
|
|
},{
|
|
'name': 'boostOfferRewardMission',
|
|
'desc': '加速悬赏任务',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=boostOfferRewardMission',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'offerRewardMissionPreview',
|
|
'desc': '悬赏任务奖励预览',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=boostOfferRewardMission',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
['objects', '', '悬赏任务对象列表type:id|']
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!data', _common.AwardItem(), '奖励信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'commitMission',
|
|
'desc': '提交任务(领取奖励)',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=commitMission',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['mission_id', 0, '任务id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'commitAll',
|
|
'desc': '提交所有任务(全部领取)',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=commitAll',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['types', [0], '任务类型数组'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.Award(), '奖励信息'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},{
|
|
'name': 'refreshMissionList',
|
|
'desc': '刷新任务',
|
|
'group': 'Mission',
|
|
'url': 'webapp/index.php?c=Mission&a=refreshMissionList',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},
|
|
]
|
|
|
|
|
|
class RefreshInfo(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['refreshTimes', 0, '当前刷新次数'],
|
|
['maxRefreshTimes', 0, '最大刷新次数'],
|
|
['item_id', 0, '消耗道具id'],
|
|
['item_num', 0, '消耗道具数量'],
|
|
] |