game2006api/doc/OutAppNft.py
hujiabin caa0e0c8a1 1
2024-05-09 11:59:42 +08:00

62 lines
2.0 KiB
Python

# -*- coding: utf-8 -*-
import _common
class OutAppNft(object):
def __init__(self):
self.apis = [
{
'name': 'getNftList',
'desc': 'nft列表',
'group': 'OutAppNft',
'url': 'webapp/index.php?c=OutAppNft&a=getNftList',
'params': [
['address', '', '钱包地址'],
['type', 0, '类型 1:英雄 6:gacha 7:勋章 8:星球'],
],
'response': [
_common.RspHead(),
['!nfts', [NftInfo()], 'nft列表'],
]
},
{
'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'],
]
},
]
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', [], '详细'],
]