game2006api/doc/Auction.py
aozhiwei 54930f11a5 1
2022-03-27 10:08:16 +08:00

101 lines
3.6 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
import _common
class Auction(object):
def __init__(self):
self.apis = [
{
'name': 'search',
'desc': '获取出售的商品列表',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=search',
'params': [
['account', 0, '钱包账号'],
['page', 0, '获取第几页数据'],
['sort', '', '排序字段'],
],
'response': [
_common.RspHead(),
['!rows', [_common.NftDetail()], '商品信息'],
['page', _common.Page(), '分页信息'],
]
},
{
'name': 'productOnline',
'desc': '上架商品',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=productOnline',
'params': [
['account', '', '钱包账号'],
['token', '', 'token'],
['net_id', '', '网络id'],
['token_id', '', 'token_id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'productOffline',
'desc': '上架商品',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=productOffline',
'params': [
['account', '', '钱包账号'],
['token', '', 'token'],
['net_id', '', '网络id'],
['token_id', '', 'token_id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'buy',
'desc': '购买商品',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=buy',
'params': [
['account', '', '钱包账号'],
['token', '', 'token'],
['net_id', '', '网络id'],
['token_id', '', 'token_id'],
],
'response': [
_common.RspHead(),
['order_id', '', '订单号(errcode = 0的时候根据订单号客户端定时调用queryOrder接口)查询状态'],
]
},
{
'name': 'queryOrder',
'desc': '查询订单状态',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=queryOrder',
'params': [
['account', 0, '钱包账号'],
['token', '', 'token'],
['order_id', 0, '订单id'],
],
'response': [
_common.RspHead(errcode='当errcode!=0的时候客户端不需要再调用(停止定时器)'),
['state', 0, '0:订单不存在 1:购买成功 2:交易处理中 3:交易失败'],
]
},
{
'name': 'getProductList',
'desc': '获取出售的商品列表',
'group': 'Auction',
'url': 'webapp/index.php?c=Auction&a=getProductList',
'params': [
['account', '', '钱包账号'],
['token', '', 'token'],
['net_id', '', '网络id'],
],
'response': [
_common.RspHead(),
]
},
]