import { Game, Timeframe } from "hive-bedrock-data"; import { MethodResponse } from "./utils.js"; import { ProcessedPlayerResponse } from "./processors/player.js"; import { ProcessedGlobalStatisticsResponse } from "./processors/global_statistics.js"; import { ProcessedMapResponse } from "./processors/map.js"; import { ProcessedGameMetadata } from "./processors/meta.js"; import { ProcessedPlayerSearchResponse } from "./processors/player_search.js"; import { AvailableLeaderboardResponse, ProcessedAllGamesResponse, ProcessedGame, ProcessedMonthlyGamesResponse } from "./processors/game.js"; export interface Options { resolveDynamicTitles?: boolean; useModernLeaderboardSource?: boolean; apiBaseEndpoint?: string; requestInit?: RequestInit; } export interface MethodOptions { requestInit?: RequestInit; } export default class HiveAPI { options: Options; constructor(options?: Options); private _fetchAPI; /** * `/game/all/main/{identifier}` Gets information about a player * @param identifier Username or UUID of the player * @returns The player information */ getPlayer(identifier: string, options?: Partial): Promise>; /** * `/player/search/{prefix}` Gets a list of players that match the prefix * @param prefix The prefix to search for (must be at least 4 characters long) * @returns A list of players that match the prefix */ getPlayerSearch(prefix: string, options?: Partial): Promise>; /** * Gets statistics for a player * @param identifier Username or UUID of the player * @param timeframe The timeframe to get the statistics for * @param options Additional options including specific game, month, and year * @returns The player statistics */ getStatistics(identifier: string, timeframe: Timeframe.AllTime, options?: Partial): Promise>; getStatistics(identifier: string, timeframe: Timeframe.Monthly, month?: number, year?: number, options?: Partial): Promise>; getStatistics(identifier: string, timeframe: Timeframe.Seasonal, game: G, season?: number, options?: Partial): Promise>; private _getStatisticsAllTime; private _getStatisticsMonthly; private _getStatisticsSeasonal; getAvailableMonthlyLeaderboards(game: G, options?: Partial): Promise>; /** * `/game/all/{game}` Gets statistics for a game * @param timeframe The timeframe to get the statistics for * @param game The game to get the statistics for * @param options Additional options including specific month and year */ getLeaderboard(timeframe: Timeframe.AllTime, game: G, options?: Partial): Promise[G][] | null>>; getLeaderboard(timeframe: Timeframe.Monthly, game: G, month?: number, year?: number, options?: Partial): Promise[G][] | null>>; getLeaderboard(timeframe: Timeframe.Seasonal, game: G, season?: number, options?: Partial): Promise[G][] | null>>; private _getLeaderboardAllTime; private _getLeaderboardMonthly; private _getLeaderboardSeasonal; /** * `/global/statistics` Gets global statistics * @returns The global statistics */ getGlobalStatistics(options?: Partial): Promise>; /** * `/game/map/{game}` Gets information about the maps in a game * @param game The game to get the maps for (fails for games without maps) * @returns A list of maps in the game */ getGameMaps(game: Game, options?: Partial): Promise>; /** * `/game/meta/{game}` Gets metadata about a game * @param game The game to get the metadata for * @returns The metadata for the game */ getGameMetadata(game: Game, options?: Partial): Promise>; } //# sourceMappingURL=HiveAPI.d.ts.map