osrs-json-hiscores
Version:
The Old School Runescape API wrapper that does more!
66 lines (65 loc) • 5.59 kB
TypeScript
export declare const BASE_URL = "https://secure.runescape.com/m=hiscore_oldschool";
export declare const STATS_URL = "index_lite.ws?player=";
export declare const JSON_STATS_URL = "index_lite.json?player=";
export declare const SCORES_URL = "overall.ws?";
export declare const WHITESPACE_REGEX_STRING = "( |-|_)";
export declare const WHITESPACE_REGEX: RegExp;
export type GamemodeUrl = {
[key in Gamemode]: string;
};
export declare const GAMEMODE_URL: GamemodeUrl;
export declare const SKILLS: readonly ["overall", "attack", "defence", "strength", "hitpoints", "ranged", "prayer", "magic", "cooking", "woodcutting", "fletching", "fishing", "firemaking", "crafting", "smithing", "mining", "herblore", "agility", "thieving", "slayer", "farming", "runecraft", "hunter", "construction", "sailing"];
export type SkillName = (typeof SKILLS)[number];
export declare const CLUES: readonly ["all", "beginner", "easy", "medium", "hard", "elite", "master"];
export type ClueType = (typeof CLUES)[number];
export declare const BH_MODES: readonly ["hunterV2", "rogueV2", "hunter", "rogue"];
export type BHType = (typeof BH_MODES)[number];
export declare const GAMEMODES: readonly ["main", "ironman", "hardcore", "ultimate", "deadman", "seasonal", "tournament", "skiller", "oneDefence", "freshStart"];
export type Gamemode = (typeof GAMEMODES)[number];
export declare const BOSSES: readonly ["abyssalSire", "alchemicalHydra", "amoxliatl", "araxxor", "artio", "barrows", "brutus", "bryophyta", "callisto", "calvarion", "cerberus", "chambersOfXeric", "chambersOfXericChallengeMode", "chaosElemental", "chaosFanatic", "commanderZilyana", "corporealBeast", "crazyArchaeologist", "dagannothPrime", "dagannothRex", "dagannothSupreme", "derangedArchaeologist", "doomOfMokhaiotl", "dukeSucellus", "generalGraardor", "giantMole", "grotesqueGuardians", "hespori", "kalphiteQueen", "kingBlackDragon", "kraken", "kreeArra", "krilTsutsaroth", "lunarChests", "mimic", "nex", "nightmare", "phosanisNightmare", "obor", "phantomMuspah", "sarachnis", "scorpia", "scurrius", "shellbaneGryphon", "skotizo", "solHeredit", "spindel", "tempoross", "gauntlet", "corruptedGauntlet", "hueycoatl", "leviathan", "royalTitans", "whisperer", "theatreOfBlood", "theatreOfBloodHardMode", "thermonuclearSmokeDevil", "tombsOfAmascut", "tombsOfAmascutExpertMode", "tzKalZuk", "tzTokJad", "vardorvis", "venenatis", "vetion", "vorkath", "wintertodt", "yama", "zalcano", "zulrah"];
export type Boss = (typeof BOSSES)[number];
export declare const ACTIVITIES: readonly ["leaguePoints", "deadmanPoints", "hunterBHV2", "rogueBHV2", "hunterBH", "rogueBH", "allClues", "beginnerClues", "easyClues", "mediumClues", "hardClues", "eliteClues", "masterClues", "lastManStanding", "pvpArena", "soulWarsZeal", "riftsClosed", "colosseumGlory", "collectionsLogged", "abyssalSire", "alchemicalHydra", "amoxliatl", "araxxor", "artio", "barrows", "brutus", "bryophyta", "callisto", "calvarion", "cerberus", "chambersOfXeric", "chambersOfXericChallengeMode", "chaosElemental", "chaosFanatic", "commanderZilyana", "corporealBeast", "crazyArchaeologist", "dagannothPrime", "dagannothRex", "dagannothSupreme", "derangedArchaeologist", "doomOfMokhaiotl", "dukeSucellus", "generalGraardor", "giantMole", "grotesqueGuardians", "hespori", "kalphiteQueen", "kingBlackDragon", "kraken", "kreeArra", "krilTsutsaroth", "lunarChests", "mimic", "nex", "nightmare", "phosanisNightmare", "obor", "phantomMuspah", "sarachnis", "scorpia", "scurrius", "shellbaneGryphon", "skotizo", "solHeredit", "spindel", "tempoross", "gauntlet", "corruptedGauntlet", "hueycoatl", "leviathan", "royalTitans", "whisperer", "theatreOfBlood", "theatreOfBloodHardMode", "thermonuclearSmokeDevil", "tombsOfAmascut", "tombsOfAmascutExpertMode", "tzKalZuk", "tzTokJad", "vardorvis", "venenatis", "vetion", "vorkath", "wintertodt", "yama", "zalcano", "zulrah"];
export type ActivityName = (typeof ACTIVITIES)[number];
export type FormattedBossNames = {
[key in Boss]: string;
};
export declare const FORMATTED_BOSS_NAMES: FormattedBossNames;
export type FormattedSkillNames = {
[key in SkillName]: string;
};
export declare const FORMATTED_SKILL_NAMES: FormattedSkillNames;
export type FormattedClueNames = {
[key in ClueType]: string;
};
export declare const FORMATTED_CLUE_NAMES: FormattedClueNames;
export type FormattedBHNames = {
[key in BHType]: string;
};
export declare const FORMATTED_BH_NAMES: FormattedBHNames;
export declare const FORMATTED_LMS = "LMS - Rank";
export declare const FORMATTED_PVP_ARENA = "PvP Arena - Rank";
export declare const FORMATTED_SOUL_WARS = "Soul Wars Zeal";
export declare const FORMATTED_LEAGUE_POINTS = "League Points";
export declare const FORMATTED_DEADMAN_POINTS = "Deadman Points";
export declare const FORMATTED_RIFTS_CLOSED = "Rifts closed";
export declare const FORMATTED_COLOSSEUM_GLORY = "Colosseum Glory";
export declare const FORMATTED_COLLECTIONS_LOGGED = "Collections Logged";
export declare const INVALID_FORMAT_ERROR = "Invalid hiscores format";
export declare const PLAYER_NOT_FOUND_ERROR = "Player not found";
export declare const HISCORES_ERROR = "HiScores not responding";
export declare class InvalidFormatError extends Error {
__proto__: ErrorConstructor;
constructor();
}
export declare class InvalidRSNError extends Error {
__proto__: ErrorConstructor;
constructor(message: string);
}
export declare class PlayerNotFoundError extends Error {
__proto__: ErrorConstructor;
constructor();
}
export declare class HiScoresError extends Error {
__proto__: ErrorConstructor;
constructor();
}