From 223de9a77321f3f48d21764215b596e25e199a38 Mon Sep 17 00:00:00 2001 From: maxswa Date: Thu, 13 Jun 2019 16:47:57 -0400 Subject: [PATCH] Add constants --- src/utils/constants.ts | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/utils/constants.ts diff --git a/src/utils/constants.ts b/src/utils/constants.ts new file mode 100644 index 0000000..a703d50 --- /dev/null +++ b/src/utils/constants.ts @@ -0,0 +1,72 @@ +import { SkillName, ClueType, BHType, Gamemode, Mode } from '../types'; + +export const BASE_URL = 'http://services.runescape.com/m=hiscore_oldschool'; +export const STATS_URL = 'index_lite.ws?player='; +export const SCORES_URL = 'overall.ws?'; +export const GAMEMODE_URL = { + dmm: '_deadman/', + dmmt: '_tournament/', + hc: '_ironman/', + iron: '_ironman/', + main: '/', + sdmm: '_seasonal/', + ult: '_ultimate/', +}; +export const SKILLS: SkillName[] = [ + 'overall', + 'attack', + 'defence', + 'strength', + 'hitpoints', + 'ranged', + 'prayer', + 'magic', + 'cooking', + 'woodcutting', + 'fletching', + 'fishing', + 'firemaking', + 'crafting', + 'smithing', + 'mining', + 'herblore', + 'agility', + 'thieving', + 'slayer', + 'farming', + 'runecraft', + 'hunter', + 'construction', +]; +export const CLUES: ClueType[] = [ + 'all', + 'beginner', + 'easy', + 'medium', + 'hard', + 'elite', + 'master', +]; +export const BH: BHType[] = ['rogue', 'hunter']; +export const OTHER = [ + 'hunterbh', + 'roguebh', + 'lms', + 'allclues', + 'beginnerclues', + 'easyclues', + 'mediumclues', + 'hardclues', + 'eliteclues', + 'masterclues', +]; +export const GAMEMODES: Gamemode[] = [ + 'main', + 'iron', + 'hc', + 'ult', + 'dmm', + 'sdmm', + 'dmmt', +]; +export const MODES: Mode[] = [...GAMEMODES, 'full'];