# -*- 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(), ['type', '', '芯片类型:1 英雄;2 枪械'], ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片列表'] ] },{ 'name': 'chipOrder', 'desc': '芯片列表排序', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=chipOrder', 'params': [ _common.ReqHead(), ['type', '', '芯片类型:1 英雄;2 枪械'], ['order', '', 'asc 升序;desc 降序'], ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片列表'] ] },{ 'name': 'beforeInlay', 'desc': '芯片镶嵌前置,获取可镶嵌的芯片', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=beforeInlay', 'params': [ _common.ReqHead(), ['type', '', '芯片类型:1 英雄;2 枪械'], ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片列表'] ] },{ 'name': 'inlayChip', 'desc': '芯片镶嵌', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=inlayChip', 'params': [ _common.ReqHead(), ['hero_id', '', '英雄idx'], ['token_id', '', '芯片token id'], ], 'response': [ _common.RspHead(), ['!data', [_common.Hero()], '英雄加成信息'] ] },{ 'name': 'demountChip', 'desc': '芯片卸下', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=demountChip', 'params': [ _common.ReqHead(), ['hero_id', '', '英雄idx'], ['token_id', '', '芯片token id'], ], 'response': [ _common.RspHead(), ['!data', [_common.Hero()], '英雄加成信息'] ] },{ 'name': 'replaceChip', 'desc': '芯片替换', 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=replaceChip', 'params': [ _common.ReqHead(), ['hero_id', '', '英雄idx'], ['token_id_new', '', '新芯片token id'], ['token_id_old', '', '被替换的芯片token id'], ], 'response': [ _common.RspHead(), ['!data', [_common.Hero()], '英雄加成信息'] ] } ]