game2006api/doc/Nft.py
hujiabin 4f8ea3ac90 1
2023-08-28 11:54:48 +08:00

62 lines
1.9 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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', [], '详细'],
]