# -*- coding: utf-8 -*- import _common class Star(object): def __init__(self): self.apis = [ { 'name': 'getList', 'desc': '成长任务列表', 'group': 'Star', 'url': 'webapp/index.php?c=Star&a=getList', 'params': [ _common.ReqHead(), ], 'response': [ _common.RspHead(), ['countdown', 0, '赛季结束时间'], ['!data', [Task()], '任务列表'], ] },{ 'name': 'commit', 'desc': '领取任务', '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(), '属性变更'], ] },{ 'name': 'commitAll', 'desc': '全部领取', '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:任务进行中-未完成(不可领取)'], ]