83 lines
2.5 KiB
JavaScript
83 lines
2.5 KiB
JavaScript
const common = require('../common');
|
|
|
|
module.exports = class {
|
|
|
|
constructor() {
|
|
this.apis = [
|
|
{
|
|
'method': 'POST',
|
|
'name': 'orderquery',
|
|
'desc': '获取订单信息',
|
|
'group': 'nft',
|
|
'url': 'api/v1/nft/orderquery',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['order_id', '', '订单id'],
|
|
['contract_address', '', '合约地址'],
|
|
['token_id', '', 'token_id'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.Order()]
|
|
]
|
|
},
|
|
{
|
|
'method': 'POST',
|
|
'name': 'salequery',
|
|
'desc': '获取售卖信息',
|
|
'group': 'nft',
|
|
'url': 'api/v1/nft/salequery',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['order_id', '', '订单id'],
|
|
['buyer', '', '买家'],
|
|
['seller', '', '卖家'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.Sale()]
|
|
]
|
|
},
|
|
{
|
|
'method': 'POST',
|
|
'name': 'nftquery',
|
|
'desc': '获取NFT信息',
|
|
'group': 'nft',
|
|
'url': 'api/v1/nft/nftquery',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['owner_address', '', '所有者'],
|
|
['last_owner_address', '', '上一个所有者'],
|
|
['net_id', '', 'net_id'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.NFT()]
|
|
]
|
|
}
|
|
];
|
|
}
|
|
|
|
// ...
|
|
} |