1
This commit is contained in:
parent
f45a13bc9f
commit
98b4169382
@ -6,11 +6,14 @@ class AAMarket(object):
|
||||
self.apis = [
|
||||
{
|
||||
'method': 'POST',
|
||||
'name': '/api/market/product/list',
|
||||
'name': '/api/market/product/list/:net_id',
|
||||
'desc': '获取上架出售的NFTs(瀑布流式api)',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/market/product/list',
|
||||
'url': 'https://market-test.kingsome.cn/api/market/product/list/:net_id',
|
||||
'is_json_params': True,
|
||||
'request_params': [
|
||||
[':net_id', 0, '链id'],
|
||||
],
|
||||
'params': [
|
||||
['page_size', 0, '每页大小'],
|
||||
['cursor', '', '游标 第一页传空'],
|
||||
@ -33,14 +36,16 @@ class AAMarket(object):
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['page', _common.StreamPage(), '分页信息'],
|
||||
['!rows', [_common.MarketGoods()], '数据'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': '/api/market/transaction/history/:account_address',
|
||||
'name': '/api/market/transaction/history/:net_id/:account_address',
|
||||
'desc': '获取账号交易历史',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/market/transaction/history/:account_address',
|
||||
'url': 'https://market-test.kingsome.cn/api/market/transaction/history/:net_id/:account_address',
|
||||
'params': [
|
||||
[':net_id', 0, '链id'],
|
||||
[':account_address', '', '钱包地址'],
|
||||
['type', '', '0:全部 1:买进 2:卖出'],
|
||||
['page_size', 0, '每页大小'],
|
||||
@ -49,14 +54,16 @@ class AAMarket(object):
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['page', _common.StreamPage(), '分页信息'],
|
||||
['!rows', [_common.NftInfo()], '数据'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': '/api/asset/:account_address',
|
||||
'name': '/api/asset/:net_id/:account_address',
|
||||
'desc': '获取账号资产',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/asset/:account_address',
|
||||
'url': 'https://market-test.kingsome.cn/api/asset/:net_id/:account_address',
|
||||
'params': [
|
||||
[':net_id', 0, '链id'],
|
||||
[':account_address', '', '钱包地址'],
|
||||
['type', '', '0:全部 1:上架中 2:未上架'],
|
||||
['page_size', 0, '每页大小'],
|
||||
@ -65,6 +72,7 @@ class AAMarket(object):
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['page', _common.StreamPage(), '分页信息'],
|
||||
['!rows', [_common.NftInfo()], '数据'],
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -1717,3 +1717,52 @@ class StreamPage(object):
|
||||
['previous_cursor', '', '前一页游标'],
|
||||
['remaining', 0, '是否有更多数据'],
|
||||
]
|
||||
|
||||
class NftHeroDetailNew(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['quality', 0, '星级'],
|
||||
['max_mining_days', 0, '打金天数(最大)'],
|
||||
['wealth', 0, '财富值'],
|
||||
['lucky', 0, '幸运值'],
|
||||
['hp', 0, '血量'],
|
||||
['atk', 0, '攻击'],
|
||||
['def', 0, '攻击'],
|
||||
['block', 0, '格挡'],
|
||||
['crit', 0, '暴击'],
|
||||
]
|
||||
|
||||
class NftGoldBullionDetail(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['gold_coins', 0, '金币数'],
|
||||
]
|
||||
|
||||
class NftInfo(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['net_id', 0, '链id'],
|
||||
['contract_address', 0, '合约地址'],
|
||||
['token_id', '', 'token id'],
|
||||
['owner_address', '', '所有者地址'],
|
||||
['meta_url', '', '元数据url'],
|
||||
['name', '', 'nft名字'],
|
||||
['item_id', 0, '道具id'],
|
||||
['type', '', 'nft类型 1:英雄 11:金砖'],
|
||||
['image', '', 'nft图片地址'],
|
||||
['detail', Union([
|
||||
[NftHeroDetailNew(), '英雄'],
|
||||
[NftGoldBullionDetail(), '英雄'],
|
||||
]), 'nft详细信息'],
|
||||
]
|
||||
|
||||
class MarketGoods(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['event', '', 'json格式订单webhooks事件信息https://docs.immutable.com/docs/zkEVM/products/blockchain-data/webhooks/webhooks-orders'],
|
||||
['nft', NftInfo(), 'nft信息'],
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user