# -*- coding: utf-8 -*- import _common class Market(object): def __init__(self): self.apis = [ { 'name': 'listSellNfts', 'desc': '获取上架出售的NFTs', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=listSellNfts', 'params': [ ['account', '', '账号id'], ['token', '', 'token'], ['start', 0, '分页开始偏移'], ['page_size', 0, '分页大小'], ['order_method', 0, '排序方式 0:默认排序(当前指向1) 1:上架时间 2:价格 3:星级质量 4:等级 5:能量值 6:生命值 7:攻击力 8:防御力'], ['order_asc', 0, '排序方向, 0:从小到大 1:从大到小'], ['type', 0, '物品类型 1:英雄 2:武器 3:芯片 5:碎片'], ['job_filters', '', '职业过滤(用|分割)'], ['search_filters', '', '搜索过滤(用|分割)'], ['lv_filter', 0, '等级过滤'], ['quality_filter', 0, '品阶顾虑'], ['durability_filter', 0, '能量过滤'], ['price_filter', '', '价格过滤(用|分割)'], ['amount_filter', '', '数量过滤(低|高)'] ], 'response': [ _common.RspHead(), ['total', 0, '出售的列表总数量(当前过滤配置)'], ['start', 0, '有效的分页偏移'], ['page_size', 0, '有效的分页大小'], ['!nfts', [_common.NftIntro()], 'nft列表'], ] }, { 'name': 'listMyNfts', 'desc': '获取自己的NFTs', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=listMyNfts', 'params': [ ['start', 0, '分页开始偏移'], ['page_size', 0, '分页大小'], ['order_method', 0, '排序方式 0:默认排序(当前指向1) 1:等级 2:能量值 3:星级 4:tokenid'], ['order_asc', 0, '排序方向, 0:从小到大 1:从大到小'], ['type', 0, '物品类型 1:英雄 2:武器 3:芯片 5:碎片'], ['job_filters', '', '职业过滤(用|分割)'], ['search_filters', '', '搜索过滤(用|分割)'], ['lv_filter', 0, '等级过滤'], ['quality_filter', 0, '品阶顾虑'], ['durability_filter', 0, '能量过滤'], ], 'response': [ _common.RspHead(), ['total', 0, '出售的列表总数量(当前过滤配置)'], ['start', 0, '有效的分页偏移'], ['page_size', 0, '有效的分页大小'], ['!nfts', [_common.NftIntro()], 'nft列表'], ] }, { 'name': 'sellMyNft', 'desc': '出售NFT', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=sellMyNft', 'params': [ ['account', '', '账号id'], ['token', '', 'token'], ['nft_token', '', 'nft_token'], ['s_price', '', '出售价格USDT'], ['amount', 0, '出售数量'], ['payment_token_address', '', 'payment_token_address'], ['nonce', '', 'nonce'], ['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'], ['net_id', '', '网络id'], ], 'response': [ _common.RspHead() ] }, { 'name': 'sell', 'desc': '出售NFT', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=sell', 'params': [ _common.ReqHead(), ['account', '', '账号id'], ['token', '', 'token'], ['nft_token', '', 'nft_token'], ['item_id', '', '道具id,'], ['s_price', '', '出售价格USDT'], ['amount', 0, '出售数量'], ['payment_token_address', '', 'payment_token_address'], ['nonce', '', 'nonce'], ['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'], ['net_id', '', '网络id'], ], 'response': [ _common.RspHead() ] }, { 'name': 'sellCancel', 'desc': '下架物品', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=sellCancel', 'params': [ _common.ReqHead(), ['account', '', '账号id'], ['idx', '', '出售的idx'], ], 'response': [ _common.RspHead() ] }, { 'name': 'sellUpdatePrice', 'desc': '修改价格', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=sellUpdatePrice', 'params':[ _common.ReqHead(), ['account', '', '账号id'], ['idx', '', '出售的idx'], ['s_price', '', '出售价格USDT'], ], 'response': [ _common.RspHead() ] }, { 'name': 'buy', 'desc': '购买商品 (金币购买)', 'group': 'Market', 'url': 'webapp/index.php?c=Market&a=buy', 'params': [ _common.ReqHead(), ['account', '', '账号id'], ['idx', '', '出售的idx'], ['s_price', '', '出售价格USDT'], ], 'response': [ _common.RspHead() ] }, ]