osu-api-extended
Version:
Advanced osu! api wrapper for v1 and v2, with extra stuff
63 lines • 2.17 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.description = void 0;
const request_1 = require("../../../../../utility/request");
const request = (0, request_1.namespace)('https://osu.ppy.sh/api/v2/');
exports.description = {
auth: 1,
title: __filename,
method: 'GET',
description: 'Return topic data and posts list',
params: [
{
type: 'number',
name: 'topic',
optional: false,
description: 'Topic id',
},
{
name: 'object',
params: [
{
type: 'string',
name: 'cursor_string',
optional: true,
description: 'Parameter for pagination',
},
{
type: 'string',
name: 'sort',
optional: true,
description: '\`\`\`id_asc\`\`\` or \`\`\`id_desc\`\`\`',
},
{
type: 'number',
name: 'limit',
optional: true,
description: 'Maximum number of posts to be returned (20 default, 50 at most)',
},
{
type: 'string',
name: 'start',
optional: true,
description: 'First post id to be returned with sort set to id_asc. This parameter is ignored if cursor_string is specified',
},
{
type: 'string',
name: 'end',
optional: true,
description: 'Last post id to be returned with sort set to id_desc. This parameter is ignored if cursor_string is specified.',
},
]
},
],
};
const name = async (topic, obj) => {
const data = await request(`forums/topics/${topic}`, {
method: 'GET',
params: obj,
});
return data;
};
exports.default = name;
//# sourceMappingURL=details.js.map
;