# -*- coding: utf-8 -*- import _common class Chip(object): def __init__(self): self.apis = [ { 'name': 'chipList', 'desc': '获取芯片列表', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=chipList', 'params': [ _common.ReqHead(), ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片列表'] ] },{ 'name': 'chipDetails', 'desc': '芯片详情', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=chipDetails', 'params': [ _common.ReqHead(), ['unique_id', '', 'unique_id'], ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片信息'] ] },{ 'name': 'upgradeQuality', 'desc': '芯片升阶', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=upgradeQuality', 'params': [ _common.ReqHead(), ['chip_uniid', '', '升阶芯片唯一id'], ['consume_uniids', '', '材料芯片唯一id,用“|”隔开'], ], 'response': [ _common.RspHead(), ['status', 0, '0=失败 1=成功'], ['property_chg', _common.PropertyChg(), '属性变更'], ] }, { 'name': 'synChip', 'desc': '芯片合成', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=synChip', 'params': [ _common.ReqHead(), ['item_id', '', '材料item_id'], ], 'response': [ _common.RspHead(), ['award', _common.AwardItem(), '合成芯片奖励'], ['property_chg', _common.PropertyChg(), '属性变更'], ] }, { 'name': 'resolveChip', 'desc': '分解芯片', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=resolveChip', 'params': [ _common.ReqHead(), ['chip_uniids', '', '芯片uniid 多个用“|”隔开'], ], 'response': [ _common.RspHead(), ['award', _common.AwardItem(), '分解所得材料'], ['property_chg', _common.PropertyChg(), '属性变更'], ] }, ]