typerinth
Version:
A TypeScript library for interacting with the Modrinth API.
22 lines (21 loc) • 630 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Route_1 = require("../Route");
const errors_1 = require("../../errors");
class StatisticsRoute extends Route_1.Route {
constructor(baseUrl, ua, cacheManager) {
super(baseUrl, ua, cacheManager);
}
getCacheKey() {
return 'statistics';
}
getUrl() {
return Route_1.Route.addPathSegment(this.baseUrl, '/statistics');
}
parseData(data) {
if (!data)
throw new errors_1.UnexpectedApiError('Unexpected empty response');
return data;
}
}
exports.default = StatisticsRoute;