import { APIBattle, APIBrawler, APIClub, APIClubMember, APIMap, APIPlayer, APIPowerPlayLeague, APIRankingClub, APIRankingPlayer, Country } from "../_interfaces/interfaces"; /** * Makes requests to the Brawl Stars API. * @class */ export default class API { /** * The API token. * @type {string} * @private */ private token; /** * The base URL for the API. * @type {string} * @private */ private baseUrl; /** * The Axios configuration object. * @type {object} * @private */ private config; /** * Creates a new instance of the API class. * @param {string} token The API token. * @constructor */ constructor(token: string); /** * Makes a request to the Brawl Stars API using the provided url. * @param {string} url The URL to make the request to. * @returns {Promise} * @throws {Error} If the API returns an error. * @private */ private request; /** * Retrieves a player's data from the Brawl Stars API. * @param {string} tag The player's tag, formatted as "#2R20PL0UR" * @returns {Promise} A promise that resolves to the player's data. */ player(tag: string): Promise; /** * Retrieves the battle log for the player with the given tag. * @param {string} tag - The tag of the player to retrieve the battle log for. * @return {Promise} A promise that resolves to an array of objects representing the player's battle log. */ battleLog(tag: string): Promise; /** * Returns information about a specific club. * @param {string} tag - Club tag * @returns {Promise} Club information */ club(tag: string): Promise; /** * Retrieves the list of members of a club. * @param {string} tag - The tag of the club to retrieve information for. * @returns {Promise} An array of objects representing the members of the club. */ clubMembers(tag: string): Promise; /** * Returns a list of all brawlers in the game. * @returns {Promise} A promise that resolves to an array of brawlers. */ brawlers(): Promise; /** * Retrieve information about a specific brawler * @param {number} id - The id brawler * @returns {Promise} A promise that resolves to an object containing information about the brawler */ brawler(id: number | string): Promise; /** * Returns an array of seasons for the specified country's Power Play ranking. * @param {Country} [counrty="global"] - counrty The country to get the Power Play ranking seasons for. Defaults to 'global'. * @returns {Promise} An array of seasons for the specified country's Power Play ranking. */ powerPlayRankingSeasons(counrty?: Country): Promise; /** * Get the trophy ranking for a specific country. * @param {Country} [counrty="global"] - counrty The country to get the ranking for. Defaults to "global". * @returns {Promise} An array of players ranked by their trophies. */ trophyRanking(counrty?: Country): Promise; /** * Get the power play ranking for a specific country and season. * @param {(number | "latest")} id The ID of the season. Defaults to "latest". * @param {Country} [counrty="global"] - counrty The country to get the ranking for. Defaults to "global". * @returns {Promise} An array of players ranked by their power play points. */ powerPlayRanking(id?: number | string, counrty?: Country): Promise; /** * @param {number | string} id - The brawler ID or name. * @param {Country} [counrty="global"] - The country code. * @returns {Promise} A list of players and their rankings for a specific brawler. */ brawlerRanking(id: number | string, counrty?: Country): Promise; /** *Returns an array of ranking clubs in a specific country. *@param {Country} [counrty="global"] counrty The country code. Default is "global". *@returns {Promise} An array of ranking clubs. */ clubRanking(counrty?: Country): Promise; /** * Returns the current rotation of maps in the game. * @returns {Promise} The current rotation of maps. */ rotation(): Promise; }