81 lines
2.4 KiB
JavaScript
81 lines
2.4 KiB
JavaScript
const common = require('../common');
|
|
|
|
module.exports = class {
|
|
|
|
constructor() {
|
|
this.apis = [
|
|
{
|
|
'method': 'POST',
|
|
'name': 'info',
|
|
'desc': '获取玩家信息',
|
|
'group': 'player',
|
|
'url': 'api/v1/player/info',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['name', '', '用户名字'],
|
|
['accurate_name'], false, '是否精确匹配名字',
|
|
['account_id', '', '账号id'],
|
|
['address', '', '钱包地址'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.Player()]
|
|
]
|
|
},
|
|
{
|
|
'method': 'POST',
|
|
'name': 'bagquery',
|
|
'desc': '获取玩家背包信息',
|
|
'group': 'player',
|
|
'url': 'api/v1/player/bagquery',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['account_id', '', '账号id'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.BagItem()]
|
|
]
|
|
},
|
|
{
|
|
'method': 'POST',
|
|
'name': 'heroesquery',
|
|
'desc': '获取玩家英雄信息',
|
|
'group': 'player',
|
|
'url': 'api/v1/player/heroesquery',
|
|
'header': [
|
|
],
|
|
'is_json_params': true,
|
|
'params': [
|
|
['account_id', '', '账号id'],
|
|
],
|
|
'uri_params': [
|
|
['cursor', '', '游标'],
|
|
['page_size', '', '每页数量'],
|
|
],
|
|
'response': [
|
|
new common.RspHead(),
|
|
new common.StreamPagination(),
|
|
['!data', common.Hero()]
|
|
]
|
|
}
|
|
];
|
|
}
|
|
|
|
// ...
|
|
}
|