/**
 * @param API_KEY
 * @param region Optional, defaults to `all`, change the region if you wanna get results from a different region
 * @example
 * ```js
 * // CommonJS:
 * const BrawlhallaApi = require('brawl.js').default
 * // ES:
 * import BrawlhallaApi from 'brawl.js'
 * const bh = new BrawlhallaApi(API_KEY, "eu") // "eu" is the region, default region is "all", no need to add the region parameter
 * ```
 */
export default class BrawlhallaApi {
    private API_KEY;
    region?: string;
    user_agent: string;
    private handleError;
    /**
     * @param API_KEY The API key you got from Brawlhalla
     * @param region Optional, defaults to `all`, change the region if you wanna get results form a different region,
     * @example
     * ```js
     * // CommonJS:
     * const BrawlhallaApi = require('brawl.js').default
     * // ES:
     * import BrawlhallaApi from 'brawl.js'
     * const bh = new BrawlhallaApi(API_KEY, "eu") // "eu" is the region, default region is "all", no need to add the region parameter
     * ```
     */
    constructor(API_KEY: string, region?: string);
    /**
     * @returns An object of the player's stats
     * @param id the `brawlhalla_id` of the player
     * @example
     * ```js
     * // Get player's stats
     * let player = await bh.getPlayerStats(1).catch((err) => console.log("Player does not exist!"))
     * console.log(player)
     * // {
     * // "brawlhalla_id": 1,
     * // ...}
     * ```
     */
    getPlayerStats(id: number | string): Promise<Object>;
    /**
     * @returns An object of the player's ranked stats if it exists
     * @param id the `brawlhalla_id` of the player
     * @example
     * ```js
     * // Get player's ranked stats
     * let player = await bh.getPlayerRankedStats(1).catch((err) => console.log("Player does not exist!"))
     * console.log(player)
     * // {
     * // "brawlhalla_id": 1,
     * // ...}
     * ```
     */
    getPlayerRankedStats(id: number | string): Promise<Object>;
    /**
     * @returns An Array of all matched usernames
     * @param name
     * @param region Optional, defaults to `all`, change the region if you wanna get the leaderboard from a different region,
     * @param page Optional, defaults to 1
     * @param exact default: `false`. If this value is true, it will return only exact matches, if it is false, it will return partial matches.
     * @param exactCharCase default: `false`. If this value is true, it will return only exact character case matches, if it is false, it will not check for character case, needs `exact` to be true.
     * @example
     * ```js
     * // Get all players with the name "ChdML"
     * let players = await bh.getByName("ChdML").catch((err) => console.log("Player does not exist!"))
     * console.log(players)
     * // [
     * // {name: "ChdML", ...},
     * // {name: "ChdML2"},
     * // ...]
     * ```
     */
    getRankedByName(name: string, exact?: boolean, exactCharCase?: boolean, page?: number, region?: string): Promise<Array<any>>;
    /**
     * @returns An Array of all the top 1v1 players
     * @param page default: `1`
     * @param region default: `all`, change the region if you wanna get the leaderboard from a different region
     * @example
     * ```js
     * // Get page 1 of the leaderboard, if no page was provided it would automatically fetch page 1
     * let onevoneLeaderboard = await bh.get1v1Rankings().catch((err) => console.log("Error occurred!", err))
     * console.log(onevoneLeaderboard)
     * // [
     * // {rank: 1, ...},
     * // {rank: 2},
     * // ...]
     * ```
     * @example
     * ```js
     * // get page 2
     * let onevoneLeaderboard2 = await bh.get1v1Rankings(2).catch((err) => console.log("Error occurred!", err))
     * console.log(onevoneLeaderboard2)
     * // [
     * // {rank: 50, ...},
     * // {rank: 51},
     * // ...]
     * ```
     */
    get1v1Rankings(page?: number, region?: string): Promise<Array<any>>;
    /**
     * @returns An Array of all the top players
     * @param mode Required, there's `1v1`, `2v2`, and special rank modes, enter the mode you want to get the leaderboard from.
     * @param page default: `1`
     * @param region default: `all`, change the region if you wanna get the leaderboard from a different region
     * @example
     * ```js
     * // Get page 1 of the leaderboard, if no page was provided it would automatically fetch page 1
     * let kungfootLeaderboard = await bh.getRankings("kungfoot").catch((err) => console.log("Error occurred!", err))
     * console.log(kungfootLeaderboard)
     * // [
     * // {rank: 1, ...},
     * // {rank: 2},
     * // ...]
     * ```
     * @example
     * ```js
     * // get page 2
     * let kungfootLeaderboard2 = await bh.getRankings("kungfoot").catch((err) => console.log("Error occurred!", err))
     * console.log(kungfootLeaderboard2)
     * // [
     * // {rank: 50, ...},
     * // {rank: 51},
     * // ...]
     * ```
     */
    getRankings(mode: string, page?: number, region?: string): Promise<Array<any>>;
    /**
     * @returns An Array of all the top 2v2 players
     * @param page default: `1`
     * @param region default: `all`, change the region if you wanna get the leaderboard from a different region
     * @example
     * ```js
     * // Get page 1 of the leaderboard, if no page was provided it would automatically fetch page 1
     * let onevoneLeaderboard = await bh.get2v2Rankings().catch((err) => console.log("Error occurred!", err))
     * console.log(onevoneLeaderboard)
     * // [
     * // {rank: 1, ...},
     * // {rank: 2},
     * // ...]
     * ```
     * @example
     * ```js
     * // get page 2
     * let onevoneLeaderboard2 = await bh.get2v2Rankings(2).catch((err) => console.log("Error occurred!", err))
     * console.log(onevoneLeaderboard2)
     * // [
     * // {rank: 50, ...},
     * // {rank: 51},
     * // ...]
     * ```
     */
    get2v2Rankings(page?: number, region?: string): Promise<Array<any>>;
    /**
     * @returns An array of the player's `brawlhalla_id` and `name`
     * @param id
     * @example
     * ```js
     * let player = await bh.getPlayerBySteam64ID(76561197996943884)
     * console.log(player)
     * // {
     * // "brawlhalla_id": ...,
     * // "name": ...
     * // }
     * ```
     */
    getPlayerBySteam64ID(id: number | string): Promise<Object>;
    /**
     * @param id
     * @example
     * ```js
     * let clan = await bh.getClan(1)
     * console.log(clan)
     * // {
     * // "clan_id": 1,
     * // ...
     * // }
     * ```
     * @returns An object of the clan info
     */
    getClan(id: number): Promise<Object>;
    /**
     * @returns An array of all legends
     * @example
     * ```js
     * // Get all legends
     * let legends = await bh.getLegends()
     * console.log(legends)
     * // [{...}, {...}, ...]
     * ```
     */
    getLegends(): Promise<Array<any>>;
    /**
     * @returns An object of a legend from the provided id
     * @param id
     * @example
     * ```js
     * let cassidy = await bh.getLegendById(4)
     * console.log(cassidy)
     * // {
     * // "legend_id": 4,
     * // ...
     * // }
     * ```
     */
    getLegendById(id: number | string): Promise<Object>;
    /**
   * @returns a decoded string/object
   * @param res the response object from the request
   * @example
   * ```js
   * let decodedRes = await bh.decode({...})
   * console.log(decodedRes)
   * // {
   * // ...
   * // }
   * ```
   */
    decode(res: any): string | object | unknown;
    /**
   Searches for a legend with the provided name, not really recommended if you know the legend id
 * @returns An object of a legend from the provided name
 * @param name
 * @example
 * ```js
 * let cassidy = await bh.getLegendByName("cassidy")
 * console.log(cassidy)
 * // {
 * // "legend_name_key": "cassidy",
 * // ...
 * // }
 * ```
 */
    getLegendByName(name: string): Promise<Object>;
    /**
     Get the elo reset value
   * @returns Estimate value of elo on season reset
   * @param elo
   * @example
   * ```js
   * let newElo = bh.getEloResetValue(2000)
   * console.log(newElo)
   * // 1742
   * ```
   */
    getEloReset(elo: number): number;
    /**
     Get the team/legend elo reset value
   * @returns Estimate value of elo on season reset
   * @param elo
   * @example
   * ```js
   * let newTeamElo = bh.getTeamEloReset(2000)
   * console.log(newTeamElo)
   * // 1583
   * @example
   * ```js
   * let newLegendElo = bh.getTeamEloReset(2000)
   * console.log(newLegendElo)
   * // 1583
   * ```
   */
    getTeamEloReset(elo: number): number;
    /**
     Get the glory from wins
   * @returns Estimate value of glory from wins on season reset
   * @param wins
   * @example
   * ```js
   * let gloryFromWins = bh.getGloryFromWins(67)
   * console.log(gloryFromWins)
   * // 1340
   * ```
   */
    getGloryFromWins(wins: number, has_played_10_games: Boolean): number;
    /**
     Get the glory from best rating
   * @returns Estimate value of glory from wins on season reset
   * @param best_rating
   * @example
   * ```js
   * let gloryFromRating = bh.getGloryFromBestRating(1900)
   * console.log(gloryFromRating)
   * // 3941
   * ```
   */
    getGloryFromBestRating(best_rating: number): number;
    /**
     Get the wins, best rating, and total glory
   * @returns Estimate value of glory from wins on season reset
   * @param best_rating
   * @param wins
   * @param has_played_10_games
   * @example
   * ```js
   * let gloryFromRating = bh.getGlory(1900, 100)
   * console.log(gloryFromRating)
   * // {
   * // wins: 2000,
   * // rating: 3941,
   * // total: 5941,
   * // }
   * ```
   */
    getGlory(best_rating: number, wins: number, has_played_10_games: Boolean): Object;
    /**
     Fetch a path using the `https://api.brawlhalla.com` url
   * @returns The result of the fetch request
   * @param path the path to fetch, example: `/legend/all`
   * @example
   * ```js
   * let legends = await bh.get("/legend/all")
   * console.log(legends)
   * // {
   * // ...
   * // }
   *
   * ```
   */
    get(path: string): Promise<any>;
}
