UNPKG

trender-client

Version:
19 lines (18 loc) 860 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const RequestEmitter_1 = tslib_1.__importDefault(require("../utils/RequestEmitter")); class PostUserManager extends RequestEmitter_1.default { constructor(params) { super(params); } fetch(nickname, options) { var _a, _b; return tslib_1.__awaiter(this, void 0, void 0, function* () { const request = yield this.getRequest(`/users/${nickname}/posts?skip=${(_a = options === null || options === void 0 ? void 0 : options.skip) !== null && _a !== void 0 ? _a : 0}&limit=${(_b = options === null || options === void 0 ? void 0 : options.limit) !== null && _b !== void 0 ? _b : 30}`); const response = request; return response; }); } } exports.default = PostUserManager;