"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StatsService = void 0; const request_1 = require("../core/request"); class StatsService { /** * Get * A very basic stats endpoint providing basic counters for a dashboard or simmilar * @result ResponseStats * @throws ApiError */ static async statsControllerGet() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats`, }); return result.body; } /** * Get top runners by distance * Returns the top ten runners by distance. * @result ResponseStatsRunner * @throws ApiError */ static async statsControllerGetTopRunnersByDistance() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/runners/distance`, }); return result.body; } /** * Get top runners by donations * Returns the top ten runners by donations. * @result ResponseStatsRunner * @throws ApiError */ static async statsControllerGetTopRunnersByDonations() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/runners/donations`, }); return result.body; } /** * Get top runners by laptime * Returns the top ten runners by fastest laptime on your selected track (track by id). * @param track * @result ResponseStatsRunner * @throws ApiError */ static async statsControllerGetTopRunnersByLaptime(track) { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/runners/laptime`, query: { 'track': track, }, }); return result.body; } /** * Get top runners by track time * Returns the top ten fastest track times (with their runner and the runner's group). * @result ResponseStatsRunner * @throws ApiError */ static async statsControllerGetTopRunnersByTrackTime() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/scans`, }); return result.body; } /** * Get top teams by distance * Returns the top ten teams by distance. * @result ResponseStatsTeam * @throws ApiError */ static async statsControllerGetTopTeamsByDistance() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/teams/distance`, }); return result.body; } /** * Get top teams by donations * Returns the top ten teams by donations. * @result ResponseStatsTeam * @throws ApiError */ static async statsControllerGetTopTeamsByDonations() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/teams/donations`, }); return result.body; } /** * Get top orgs by distance * Returns the top ten organizations by distance. * @result ResponseStatsOrgnisation * @throws ApiError */ static async statsControllerGetTopOrgsByDistance() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/organizations/distance`, }); return result.body; } /** * Get top orgs by donations * Returns the top ten organizations by donations. * @result ResponseStatsOrgnisation * @throws ApiError */ static async statsControllerGetTopOrgsByDonations() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/stats/organizations/donations`, }); return result.body; } } exports.StatsService = StatsService;