diff --git a/doc/AAMarket.py b/doc/AAMarket.py new file mode 100644 index 00000000..a45f91e8 --- /dev/null +++ b/doc/AAMarket.py @@ -0,0 +1,70 @@ +import _common + +class AAMarket(object): + + def __init__(self): + self.apis = [ + { + 'method': 'POST', + 'name': '/api/market/product/list', + 'desc': '获取上架出售的NFTs(瀑布流式api)', + 'group': '!AAMarket', + 'url': 'https://market-test.kingsome.cn/api/market/product/list', + 'is_json_params': True, + 'params': [ + ['page_size', 0, '每页大小'], + ['cursor', '', '游标 第一页传空'], + ['search', [ + ['name', '', '名字查询 空(所有)'], + ], '模糊查询'], + ['filter', [ + ['price_min', '', '价格下限 空(无下限)'], + ['price_max', '', '价格上限 空(无上限)'], + ['!item_ids', [0], '道具id列表 空(所有)'], + ['!hero_ranks', [0], '英雄品阶列表 空(所有)'] + ], '过滤条件'], + ['sort', [ + ['!fields', [ + ['name', '', '字段名 目前支持的字段(price)'], + ['type', 0, '排序方式 -1:倒序 0:默认排序 1:正序'], + ], '排序字段'] + ], '排序规则'], + ], + 'response': [ + _common.RspHead(), + ['page', _common.StreamPage(), '分页信息'], + ] + }, + { + 'name': '/api/market/transaction/history/:account_address', + 'desc': '获取账号交易历史', + 'group': '!AAMarket', + 'url': 'https://market-test.kingsome.cn/api/market/transaction/history/:account_address', + 'params': [ + [':account_address', '', '钱包地址'], + ['type', '', '0:全部 1:买进 2:卖出'], + ['page_size', 0, '每页大小'], + ['cursor', '', '游标 第一页传空'], + ], + 'response': [ + _common.RspHead(), + ['page', _common.StreamPage(), '分页信息'], + ] + }, + { + 'name': '/api/asset/:account_address', + 'desc': '获取账号资产', + 'group': '!AAMarket', + 'url': 'https://market-test.kingsome.cn/api/asset/:account_address', + 'params': [ + [':account_address', '', '钱包地址'], + ['type', '', '0:全部 1:上架中 2:未上架'], + ['page_size', 0, '每页大小'], + ['cursor', '', '游标 第一页传空'], + ], + 'response': [ + _common.RspHead(), + ['page', _common.StreamPage(), '分页信息'], + ] + }, + ] diff --git a/doc/_common.py b/doc/_common.py index 074855b7..24642c37 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1708,3 +1708,12 @@ class NftGoldBullionMeta(object): ['image', '', 'nft图片地址'], ['!attrigutes', [NftAttribute()], 'nft属性'], ] + +class StreamPage(object): + + def __init__(self): + self.fields = [ + ['next_cursor', '', '下一页游标'], + ['previous_cursor', '', '前一页游标'], + ['remaining', 0, '是否有更多数据'], + ]