game2006api/doc/OutAppNft.py
aozhiwei 42e8591392 1
2024-08-09 16:25:53 +08:00

78 lines
2.5 KiB
Python

# -*- coding: utf-8 -*-
import _common
class OutAppNft(object):
def __init__(self):
self.apis = [
{
'name': 'getWebInfo',
'desc': 'web信息',
'group': 'OutAppNft',
'url': 'webapp/index.php?c=OutAppNft&a=getWebInfo',
'params': [
['channel', '', 'channel'],
['openId', 0, 'openId'],
],
'response': [
_common.RspHead(),
['info', WebInfo(), 'info'],
]
},
{
'name': 'getHeroInfo',
'desc': 'hero信息',
'group': 'OutAppNft',
'url': 'webapp/index.php?c=OutAppNft&a=getHeroInfo',
'params': [
['net_id', '', 'net_id'],
['token_id', '', 'token_id'],
],
'response': [
_common.RspHead(),
['info', _common.NftInfo(), 'info'],
]
},
{
'name': 'getGoldBullionInfo',
'desc': 'gold bullion信息',
'group': 'OutAppNft',
'url': 'webapp/index.php?c=OutAppNft&a=getGoldBullionInfo',
'params': [
['net_id', '', 'net_id'],
['token_id', '', 'token_id'],
],
'response': [
_common.RspHead(),
['info', _common.NftInfo(), 'info'],
]
},
]
class WebInfo(object):
def __init__(self):
self.fields = [
['loginVal', 0, '今日登录状态 1:登录 0:未登录'],
['battleTimes', '', '战斗次数'],
['winTimes', 0, '胜利次数'],
['kills', 0, '击杀数'],
['getGoldVal', 0, '获得金币数'],
]
class NftInfo(object):
def __init__(self):
self.fields = [
['idx', 0, 'idx'],
['owner_address', '', '钱包地址'],
['item_id', 0, 'item_id'],
['token_id', 0, 'token_id'],
['token_type', 0, 'token_type'],
['contract_address', '', '合约地址'],
['image', '', '头像立绘'],
['full_image', '', '全身立绘'],
['!details', [], '详细'],
]