game2006api/doc/Market.py
aozhiwei a7467f3ff3 1
2022-01-11 14:04:49 +08:00

75 lines
2.3 KiB
Python

# -*- coding: utf-8 -*-
import _common
class Market(object):
def __init__(self):
self.apis = [
{
'name': 'search',
'desc': '获取商店信息',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=search',
'params': [
['page', 0, '获取第几页数据'],
['type', 0, '0: 系统商店 1: 用户商店'],
['sort', '', '排序字段'],
],
'response': [
_common.RspHead(),
['!rows', [_common.Nft()], '商品信息'],
['page', _common.Page(), '分页信息'],
]
},
{
'name': 'buy',
'desc': '购买',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=buy',
'params': [
['goods_id', '', '商品id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'prebuy',
'desc': '预购',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=prebuy',
'params': [
['goods_id', '', '商品id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'sell',
'desc': '出售',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=sell',
'params': [
['goods_id', '', '商品id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'detail',
'desc': '获取商品详情',
'group': 'Market',
'url': 'webapp/index.php?c=Shop&a=detail',
'params': [
['goods_id', '', '商品id'],
],
'response': [
_common.RspHead(),
['info', _common.NftDetail(), '商品详细信息'],
]
},
]