67 lines
2.2 KiB
Python
67 lines
2.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class Market(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'searchBox',
|
|
'desc': '获取预售商品信息',
|
|
'group': 'Market',
|
|
'url': 'webapp/index.php?c=Market&a=searchBox',
|
|
'params': [
|
|
['account', 0, '钱包账号'],
|
|
['page', 0, '获取第几页数据'],
|
|
['sort', '', '排序字段'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!rows', [_common.PreSaleBox()], '商品信息'],
|
|
['page', _common.Page(), '分页信息'],
|
|
['presale_info', _common.PreSaleInfo(), '预售信息'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'buyBox',
|
|
'desc': '购买箱子',
|
|
'group': 'Market',
|
|
'url': 'webapp/index.php?c=Market&a=buyBox',
|
|
'params': [
|
|
['account', '', '账号id'],
|
|
['box_id', '', '箱子id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
]
|
|
},
|
|
{
|
|
'name': 'getNftList',
|
|
'desc': '获取账号对应的nft列表',
|
|
'group': 'Market',
|
|
'url': 'webapp/index.php?c=Market&a=getMyNftList',
|
|
'params': [
|
|
['account', '', '账号id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['!nfts', [_common.NftDetail()], 'nft列表'],
|
|
]
|
|
},
|
|
{
|
|
'name': 'getNftDetail',
|
|
'desc': '获取商品详情',
|
|
'group': 'Market',
|
|
'url': 'webapp/index.php?c=Market&a=getNftDetail',
|
|
'params': [
|
|
['account', '', '账号id'],
|
|
['token_id', '', 'token_id'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['info', _common.NftDetail(), '商品详细信息'],
|
|
]
|
|
},
|
|
]
|