96 lines
3.9 KiB
Python
96 lines
3.9 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_active_value', 0, '当前活跃度'],
|
||
['max_active_value', 0, '活跃度上限'],
|
||
['!mission_list1', [_common.Mission()], '任务列表1'],
|
||
['!mission_list2', [_common.Mission()], '任务列表2'],
|
||
]
|
||
},
|
||
{
|
||
'name': 'sendOfferRewardMission',
|
||
'desc': '派遣悬赏任务',
|
||
'group': 'Mission',
|
||
'url': 'webapp/index.php?c=Mission&a=sendOfferRewardMission',
|
||
'params': [
|
||
_common.ReqHead(),
|
||
['mission_id', 0, '任务id'],
|
||
['objects!',
|
||
[
|
||
['type', '', '类型 0:武器 1:英雄'],
|
||
['id', '', 'id'],
|
||
],
|
||
'悬赏任务对象列表']
|
||
],
|
||
'response': [
|
||
_common.RspHead(),
|
||
['award', _common.Award(), '奖励信息'],
|
||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||
['mission_chg', _common.Mission(), '任务的最新信息(可能为null客户端需要做容错处理)'],
|
||
]
|
||
},
|
||
{
|
||
'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': '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(), '属性变更'],
|
||
]
|
||
},
|
||
]
|