import _common class Nft(object): def __init__(self): self.apis = [ { 'name': 'getNftListByType', 'desc': '获取nft列表(类型)', 'group': 'Nft', 'url': 'webapp/index.php?c=Nft&a=getNftListByType', 'params': [ _common.ReqHead(), ['token_type', '0', '类型 1:英雄 2:枪械 3:芯片 5:碎片 6:荣誉 19:戒指'], ], 'response': [ _common.RspHead(), ['!nfts', NftInfo(), 'nft列表'], ] },{ 'name': 'getNftList', 'desc': '获取nft列表(所有)', 'group': 'Nft', 'url': 'webapp/index.php?c=Nft&a=getNftList', 'params': [ _common.ReqHead(), ], 'response': [ _common.RspHead(), ['!nfts', NftInfo(), 'nft列表'], ] },{ 'name': 'NftDetail', 'desc': 'nft信息', 'group': 'Nft', 'url': 'webapp/index.php?c=Nft&a=NftDetail', 'params': [ _common.ReqHead(), ['net_id', '0', '链'], ['token_id', '0', 'token_id'], ], 'response': [ _common.RspHead(), ['!info', [], 'nft信息'], ] }, ] class NftInfo(object): def __init__(self): self.fields = [ ['idx', 0, 'idx'], ['item_id', 0, 'item_id'], ['token_id', 0, 'token_id'], ['token_type', 0, 'token_type'], ['contract_address', 0, '合约地址'], ['createtime', 0, 'createtime'], ['!details', [], '详细'], ]