osrs-json-hiscores 2.14.1 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -0
- package/lib/hiscores.d.ts +47 -47
- package/lib/hiscores.js +401 -401
- package/lib/index.d.ts +5 -5
- package/lib/index.js +21 -17
- package/lib/types.d.ts +78 -78
- package/lib/types.js +2 -2
- package/lib/utils/constants.d.ts +36 -36
- package/lib/utils/constants.js +257 -245
- package/lib/utils/helpers.d.ts +63 -63
- package/lib/utils/helpers.js +119 -119
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/index.js +18 -14
- package/package.json +19 -20
package/lib/utils/constants.js
CHANGED
@@ -1,245 +1,257 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
3
|
-
for (var i = 0,
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
exports
|
12
|
-
exports.GAMEMODE_URL =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
exports.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
'
|
30
|
-
'
|
31
|
-
'
|
32
|
-
'
|
33
|
-
'
|
34
|
-
'
|
35
|
-
'
|
36
|
-
'
|
37
|
-
'
|
38
|
-
'
|
39
|
-
'
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
43
|
-
'
|
44
|
-
'
|
45
|
-
'
|
46
|
-
'
|
47
|
-
'
|
48
|
-
'
|
49
|
-
|
50
|
-
|
51
|
-
'
|
52
|
-
'
|
53
|
-
|
54
|
-
|
55
|
-
'
|
56
|
-
'
|
57
|
-
'
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
'
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
'
|
66
|
-
'
|
67
|
-
'
|
68
|
-
|
69
|
-
|
70
|
-
'
|
71
|
-
'
|
72
|
-
|
73
|
-
|
74
|
-
'
|
75
|
-
'
|
76
|
-
'
|
77
|
-
'
|
78
|
-
'
|
79
|
-
'
|
80
|
-
'
|
81
|
-
'
|
82
|
-
'
|
83
|
-
'
|
84
|
-
'
|
85
|
-
'
|
86
|
-
'
|
87
|
-
'
|
88
|
-
'
|
89
|
-
'
|
90
|
-
'
|
91
|
-
'
|
92
|
-
'
|
93
|
-
'
|
94
|
-
'
|
95
|
-
'
|
96
|
-
'
|
97
|
-
'
|
98
|
-
'
|
99
|
-
'
|
100
|
-
'
|
101
|
-
'
|
102
|
-
'
|
103
|
-
'
|
104
|
-
'
|
105
|
-
'
|
106
|
-
'
|
107
|
-
'
|
108
|
-
'
|
109
|
-
'
|
110
|
-
'
|
111
|
-
'
|
112
|
-
'
|
113
|
-
'
|
114
|
-
'
|
115
|
-
'
|
116
|
-
'
|
117
|
-
'
|
118
|
-
'
|
119
|
-
'
|
120
|
-
'
|
121
|
-
'
|
122
|
-
'
|
123
|
-
'
|
124
|
-
|
125
|
-
|
126
|
-
'
|
127
|
-
'
|
128
|
-
'
|
129
|
-
'
|
130
|
-
'
|
131
|
-
'
|
132
|
-
|
133
|
-
|
134
|
-
'
|
135
|
-
'
|
136
|
-
'
|
137
|
-
'
|
138
|
-
'
|
139
|
-
'
|
140
|
-
'
|
141
|
-
'
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
1
|
+
"use strict";
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
4
|
+
if (ar || !(i in from)) {
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
6
|
+
ar[i] = from[i];
|
7
|
+
}
|
8
|
+
}
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.INVALID_FORMAT_ERROR = exports.FORMATTED_RIFTS_CLOSED = exports.FORMATTED_LEAGUE_POINTS = exports.FORMATTED_SOUL_WARS = exports.FORMATTED_PVP_ARENA = exports.FORMATTED_LMS = exports.FORMATTED_BH_NAMES = exports.FORMATTED_CLUE_NAMES = exports.FORMATTED_SKILL_NAMES = exports.FORMATTED_BOSS_NAMES = exports.ACTIVITIES = exports.BOSSES = exports.GAMEMODES = exports.BH_MODES = exports.CLUES = exports.SKILLS = exports.GAMEMODE_URL = exports.SCORES_URL = exports.STATS_URL = exports.BASE_URL = void 0;
|
13
|
+
exports.BASE_URL = 'https://secure.runescape.com/m=hiscore_oldschool';
|
14
|
+
exports.STATS_URL = 'index_lite.ws?player=';
|
15
|
+
exports.SCORES_URL = 'overall.ws?';
|
16
|
+
exports.GAMEMODE_URL = {
|
17
|
+
main: "".concat(exports.BASE_URL, "/"),
|
18
|
+
ironman: "".concat(exports.BASE_URL, "_ironman/"),
|
19
|
+
hardcore: "".concat(exports.BASE_URL, "_hardcore_ironman/"),
|
20
|
+
ultimate: "".concat(exports.BASE_URL, "_ultimate/"),
|
21
|
+
deadman: "".concat(exports.BASE_URL, "_deadman/"),
|
22
|
+
seasonal: "".concat(exports.BASE_URL, "_seasonal/"),
|
23
|
+
tournament: "".concat(exports.BASE_URL, "_tournament/"),
|
24
|
+
skiller: "".concat(exports.BASE_URL, "_skiller/"),
|
25
|
+
oneDefence: "".concat(exports.BASE_URL, "_skiller_defence/"),
|
26
|
+
freshStart: "".concat(exports.BASE_URL, "_fresh_start/")
|
27
|
+
};
|
28
|
+
exports.SKILLS = [
|
29
|
+
'overall',
|
30
|
+
'attack',
|
31
|
+
'defence',
|
32
|
+
'strength',
|
33
|
+
'hitpoints',
|
34
|
+
'ranged',
|
35
|
+
'prayer',
|
36
|
+
'magic',
|
37
|
+
'cooking',
|
38
|
+
'woodcutting',
|
39
|
+
'fletching',
|
40
|
+
'fishing',
|
41
|
+
'firemaking',
|
42
|
+
'crafting',
|
43
|
+
'smithing',
|
44
|
+
'mining',
|
45
|
+
'herblore',
|
46
|
+
'agility',
|
47
|
+
'thieving',
|
48
|
+
'slayer',
|
49
|
+
'farming',
|
50
|
+
'runecraft',
|
51
|
+
'hunter',
|
52
|
+
'construction'
|
53
|
+
];
|
54
|
+
exports.CLUES = [
|
55
|
+
'all',
|
56
|
+
'beginner',
|
57
|
+
'easy',
|
58
|
+
'medium',
|
59
|
+
'hard',
|
60
|
+
'elite',
|
61
|
+
'master'
|
62
|
+
];
|
63
|
+
exports.BH_MODES = ['hunterV2', 'rogueV2', 'hunter', 'rogue'];
|
64
|
+
exports.GAMEMODES = [
|
65
|
+
'main',
|
66
|
+
'ironman',
|
67
|
+
'hardcore',
|
68
|
+
'ultimate',
|
69
|
+
'deadman',
|
70
|
+
'seasonal',
|
71
|
+
'tournament'
|
72
|
+
];
|
73
|
+
exports.BOSSES = [
|
74
|
+
'abyssalSire',
|
75
|
+
'alchemicalHydra',
|
76
|
+
'artio',
|
77
|
+
'barrows',
|
78
|
+
'bryophyta',
|
79
|
+
'callisto',
|
80
|
+
'calvarion',
|
81
|
+
'cerberus',
|
82
|
+
'chambersOfXeric',
|
83
|
+
'chambersOfXericChallengeMode',
|
84
|
+
'chaosElemental',
|
85
|
+
'chaosFanatic',
|
86
|
+
'commanderZilyana',
|
87
|
+
'corporealBeast',
|
88
|
+
'crazyArchaeologist',
|
89
|
+
'dagannothPrime',
|
90
|
+
'dagannothRex',
|
91
|
+
'dagannothSupreme',
|
92
|
+
'derangedArchaeologist',
|
93
|
+
'dukeSucellus',
|
94
|
+
'generalGraardor',
|
95
|
+
'giantMole',
|
96
|
+
'grotesqueGuardians',
|
97
|
+
'hespori',
|
98
|
+
'kalphiteQueen',
|
99
|
+
'kingBlackDragon',
|
100
|
+
'kraken',
|
101
|
+
'kreeArra',
|
102
|
+
'krilTsutsaroth',
|
103
|
+
'mimic',
|
104
|
+
'nex',
|
105
|
+
'nightmare',
|
106
|
+
'phosanisNightmare',
|
107
|
+
'obor',
|
108
|
+
'phantomMuspah',
|
109
|
+
'sarachnis',
|
110
|
+
'scorpia',
|
111
|
+
'skotizo',
|
112
|
+
'spindel',
|
113
|
+
'tempoross',
|
114
|
+
'gauntlet',
|
115
|
+
'corruptedGauntlet',
|
116
|
+
'leviathan',
|
117
|
+
'whisperer',
|
118
|
+
'theatreOfBlood',
|
119
|
+
'theatreOfBloodHardMode',
|
120
|
+
'thermonuclearSmokeDevil',
|
121
|
+
'tombsOfAmascut',
|
122
|
+
'tombsOfAmascutExpertMode',
|
123
|
+
'tzKalZuk',
|
124
|
+
'tzTokJad',
|
125
|
+
'vardorvis',
|
126
|
+
'venenatis',
|
127
|
+
'vetion',
|
128
|
+
'vorkath',
|
129
|
+
'wintertodt',
|
130
|
+
'zalcano',
|
131
|
+
'zulrah'
|
132
|
+
];
|
133
|
+
exports.ACTIVITIES = __spreadArray([
|
134
|
+
'leaguePoints',
|
135
|
+
'hunterBHV2',
|
136
|
+
'rogueBHV2',
|
137
|
+
'hunterBH',
|
138
|
+
'rogueBH',
|
139
|
+
'allClues',
|
140
|
+
'beginnerClues',
|
141
|
+
'easyClues',
|
142
|
+
'mediumClues',
|
143
|
+
'hardClues',
|
144
|
+
'eliteClues',
|
145
|
+
'masterClues',
|
146
|
+
'lastManStanding',
|
147
|
+
'pvpArena',
|
148
|
+
'soulWarsZeal',
|
149
|
+
'riftsClosed'
|
150
|
+
], exports.BOSSES, true);
|
151
|
+
exports.FORMATTED_BOSS_NAMES = {
|
152
|
+
abyssalSire: 'Abyssal Sire',
|
153
|
+
alchemicalHydra: 'Alchemical Hydra',
|
154
|
+
artio: 'Artio',
|
155
|
+
barrows: 'Barrows Chests',
|
156
|
+
bryophyta: 'Bryophyta',
|
157
|
+
callisto: 'Callisto',
|
158
|
+
calvarion: "Calvar'ion",
|
159
|
+
cerberus: 'Cerberus',
|
160
|
+
chambersOfXeric: 'Chambers of Xeric',
|
161
|
+
chambersOfXericChallengeMode: 'Chambers of Xeric: Challenge Mode',
|
162
|
+
chaosElemental: 'Chaos Elemental',
|
163
|
+
chaosFanatic: 'Chaos Fanatic',
|
164
|
+
commanderZilyana: 'Commander Zilyana',
|
165
|
+
corporealBeast: 'Corporeal Beast',
|
166
|
+
crazyArchaeologist: 'Crazy Archaeologist',
|
167
|
+
dagannothPrime: 'Dagannoth Prime',
|
168
|
+
dagannothRex: 'Dagannoth Rex',
|
169
|
+
dagannothSupreme: 'Dagannoth Supreme',
|
170
|
+
derangedArchaeologist: 'Deranged Archaeologist',
|
171
|
+
dukeSucellus: 'Duke Sucellus',
|
172
|
+
generalGraardor: 'General Graardor',
|
173
|
+
giantMole: 'Giant Mole',
|
174
|
+
grotesqueGuardians: 'Grotesque Guardians',
|
175
|
+
hespori: 'Hespori',
|
176
|
+
kalphiteQueen: 'Kalphite Queen',
|
177
|
+
kingBlackDragon: 'King Black Dragon',
|
178
|
+
kraken: 'Kraken',
|
179
|
+
kreeArra: "Kree'Arra",
|
180
|
+
krilTsutsaroth: "K'ril Tsutsaroth",
|
181
|
+
mimic: 'Mimic',
|
182
|
+
nex: 'Nex',
|
183
|
+
nightmare: 'The Nightmare of Ashihama',
|
184
|
+
phosanisNightmare: "Phosani's Nightmare",
|
185
|
+
obor: 'Obor',
|
186
|
+
phantomMuspah: 'Phantom Muspah',
|
187
|
+
sarachnis: 'Sarachnis',
|
188
|
+
scorpia: 'Scorpia',
|
189
|
+
skotizo: 'Skotizo',
|
190
|
+
spindel: 'Spindel',
|
191
|
+
tempoross: 'Tempoross',
|
192
|
+
gauntlet: 'The Gauntlet',
|
193
|
+
corruptedGauntlet: 'The Corrupted Gauntlet',
|
194
|
+
leviathan: 'The Leviathan',
|
195
|
+
whisperer: 'The Whisperer',
|
196
|
+
theatreOfBlood: 'Theatre of Blood',
|
197
|
+
theatreOfBloodHardMode: 'Theatre of Blood: Hard Mode',
|
198
|
+
thermonuclearSmokeDevil: 'Thermonuclear Smoke Devil',
|
199
|
+
tombsOfAmascut: 'Tombs of Amascut',
|
200
|
+
tombsOfAmascutExpertMode: 'Tombs of Amascut: Expert Mode',
|
201
|
+
tzKalZuk: 'TzKal-Zuk',
|
202
|
+
tzTokJad: 'TzTok-Jad',
|
203
|
+
vardorvis: 'Vardorvis',
|
204
|
+
venenatis: 'Venenatis',
|
205
|
+
vetion: "Vet'ion",
|
206
|
+
vorkath: 'Vorkath',
|
207
|
+
wintertodt: 'Wintertodt',
|
208
|
+
zalcano: 'Zalcano',
|
209
|
+
zulrah: 'Zulrah'
|
210
|
+
};
|
211
|
+
exports.FORMATTED_SKILL_NAMES = {
|
212
|
+
overall: 'Overall',
|
213
|
+
attack: 'Attack',
|
214
|
+
defence: 'Defence',
|
215
|
+
strength: 'Strength',
|
216
|
+
hitpoints: 'Hitpoints',
|
217
|
+
ranged: 'Ranged',
|
218
|
+
prayer: 'Prayer',
|
219
|
+
magic: 'Magic',
|
220
|
+
cooking: 'Cooking',
|
221
|
+
woodcutting: 'Woodcutting',
|
222
|
+
fletching: 'Fletching',
|
223
|
+
fishing: 'Fishing',
|
224
|
+
firemaking: 'Firemaking',
|
225
|
+
crafting: 'Crafting',
|
226
|
+
smithing: 'Smithing',
|
227
|
+
mining: 'Mining',
|
228
|
+
herblore: 'Herblore',
|
229
|
+
agility: 'Agility',
|
230
|
+
thieving: 'Thieving',
|
231
|
+
slayer: 'Slayer',
|
232
|
+
farming: 'Farming',
|
233
|
+
runecraft: 'Runecraft',
|
234
|
+
hunter: 'Hunter',
|
235
|
+
construction: 'Construction'
|
236
|
+
};
|
237
|
+
exports.FORMATTED_CLUE_NAMES = {
|
238
|
+
all: 'Clue Scrolls (all)',
|
239
|
+
beginner: 'Clue Scrolls (beginner)',
|
240
|
+
easy: 'Clue Scrolls (easy)',
|
241
|
+
medium: 'Clue Scrolls (medium)',
|
242
|
+
hard: 'Clue Scrolls (hard)',
|
243
|
+
elite: 'Clue Scrolls (elite)',
|
244
|
+
master: 'Clue Scrolls (master)'
|
245
|
+
};
|
246
|
+
exports.FORMATTED_BH_NAMES = {
|
247
|
+
rogue: 'Bounty Hunter (Legacy) - Rogue',
|
248
|
+
hunter: 'Bounty Hunter (Legacy) - Hunter',
|
249
|
+
rogueV2: 'Bounty Hunter - Rogue',
|
250
|
+
hunterV2: 'Bounty Hunter - Hunter'
|
251
|
+
};
|
252
|
+
exports.FORMATTED_LMS = 'Last Man Standing';
|
253
|
+
exports.FORMATTED_PVP_ARENA = 'PvP Arena';
|
254
|
+
exports.FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
|
255
|
+
exports.FORMATTED_LEAGUE_POINTS = 'League Points';
|
256
|
+
exports.FORMATTED_RIFTS_CLOSED = 'Rifts Closed';
|
257
|
+
exports.INVALID_FORMAT_ERROR = 'Invalid hiscores format';
|
package/lib/utils/helpers.d.ts
CHANGED
@@ -1,63 +1,63 @@
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
2
|
-
import { Gamemode, SkillName, ActivityName } from '../types';
|
3
|
-
/**
|
4
|
-
* Will generate a stats URL for the official OSRS API.
|
5
|
-
*
|
6
|
-
* @param gamemode Gamemode to fetch ranks for.
|
7
|
-
* @param rsn Username of the player.
|
8
|
-
* @returns Encoded stats URL.
|
9
|
-
*/
|
10
|
-
export declare const getStatsURL: (gamemode: Gamemode, rsn: string) => string;
|
11
|
-
/**
|
12
|
-
* Will generate a player table URL for the official OSRS hiscores website.
|
13
|
-
*
|
14
|
-
* @param gamemode Gamemode to fetch ranks for.
|
15
|
-
* @param rsn Username of the player.
|
16
|
-
* @returns Encoded player table URL.
|
17
|
-
*/
|
18
|
-
export declare const getPlayerTableURL: (gamemode: Gamemode, rsn: string) => string;
|
19
|
-
/**
|
20
|
-
* Will generate a skill table URL for the official OSRS hiscores website.
|
21
|
-
*
|
22
|
-
* @param gamemode Gamemode to fetch ranks for.
|
23
|
-
* @param skill Skill to fetch ranks for.
|
24
|
-
* @param page Page number.
|
25
|
-
* @returns
|
26
|
-
*/
|
27
|
-
export declare const getSkillPageURL: (gamemode: Gamemode, skill: SkillName, page: number) => string;
|
28
|
-
/**
|
29
|
-
* Will generate an activity table URL for the official OSRS hiscores website.
|
30
|
-
*
|
31
|
-
* @param gamemode Gamemode to fetch ranks for.
|
32
|
-
* @param activity Activity or boss to fetch ranks for.
|
33
|
-
* @param page Page number.
|
34
|
-
* @returns
|
35
|
-
*/
|
36
|
-
export declare const getActivityPageURL: (gamemode: Gamemode, activity: ActivityName, page: number) => string;
|
37
|
-
/**
|
38
|
-
* Extracts a number from an OSRS hiscores table cell element.
|
39
|
-
*
|
40
|
-
* @param el OSRS hiscores table cell element.
|
41
|
-
* @returns Number parsed from cell text.
|
42
|
-
*/
|
43
|
-
export declare const numberFromElement: (el: Element | null) => number;
|
44
|
-
/**
|
45
|
-
* Extracts a RSN from an OSRS hiscores table cell element.
|
46
|
-
*
|
47
|
-
* @param el OSRS hiscores table cell element.
|
48
|
-
* @returns RSN parsed from cell text.
|
49
|
-
*/
|
50
|
-
export declare const rsnFromElement: (el: Element | null) => string;
|
51
|
-
/**
|
52
|
-
* Will run an Axios `GET` request against a given URL after injecting a `User-Agent` header.
|
53
|
-
*
|
54
|
-
* @param url URL to run a `GET` request against.
|
55
|
-
* @returns Axios response.
|
56
|
-
*/
|
57
|
-
export declare const httpGet: <Response_1>(url: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<Response_1>>;
|
58
|
-
/**
|
59
|
-
* Validates that a provided RSN has the same username restrictions as Jagex.
|
60
|
-
* @param rsn Username to validate.
|
61
|
-
* @throws Error if the RSN fails validation.
|
62
|
-
*/
|
63
|
-
export declare const validateRSN: (rsn: string) => void;
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
2
|
+
import { Gamemode, SkillName, ActivityName } from '../types';
|
3
|
+
/**
|
4
|
+
* Will generate a stats URL for the official OSRS API.
|
5
|
+
*
|
6
|
+
* @param gamemode Gamemode to fetch ranks for.
|
7
|
+
* @param rsn Username of the player.
|
8
|
+
* @returns Encoded stats URL.
|
9
|
+
*/
|
10
|
+
export declare const getStatsURL: (gamemode: Gamemode, rsn: string) => string;
|
11
|
+
/**
|
12
|
+
* Will generate a player table URL for the official OSRS hiscores website.
|
13
|
+
*
|
14
|
+
* @param gamemode Gamemode to fetch ranks for.
|
15
|
+
* @param rsn Username of the player.
|
16
|
+
* @returns Encoded player table URL.
|
17
|
+
*/
|
18
|
+
export declare const getPlayerTableURL: (gamemode: Gamemode, rsn: string) => string;
|
19
|
+
/**
|
20
|
+
* Will generate a skill table URL for the official OSRS hiscores website.
|
21
|
+
*
|
22
|
+
* @param gamemode Gamemode to fetch ranks for.
|
23
|
+
* @param skill Skill to fetch ranks for.
|
24
|
+
* @param page Page number.
|
25
|
+
* @returns
|
26
|
+
*/
|
27
|
+
export declare const getSkillPageURL: (gamemode: Gamemode, skill: SkillName, page: number) => string;
|
28
|
+
/**
|
29
|
+
* Will generate an activity table URL for the official OSRS hiscores website.
|
30
|
+
*
|
31
|
+
* @param gamemode Gamemode to fetch ranks for.
|
32
|
+
* @param activity Activity or boss to fetch ranks for.
|
33
|
+
* @param page Page number.
|
34
|
+
* @returns
|
35
|
+
*/
|
36
|
+
export declare const getActivityPageURL: (gamemode: Gamemode, activity: ActivityName, page: number) => string;
|
37
|
+
/**
|
38
|
+
* Extracts a number from an OSRS hiscores table cell element.
|
39
|
+
*
|
40
|
+
* @param el OSRS hiscores table cell element.
|
41
|
+
* @returns Number parsed from cell text.
|
42
|
+
*/
|
43
|
+
export declare const numberFromElement: (el: Element | null) => number;
|
44
|
+
/**
|
45
|
+
* Extracts a RSN from an OSRS hiscores table cell element.
|
46
|
+
*
|
47
|
+
* @param el OSRS hiscores table cell element.
|
48
|
+
* @returns RSN parsed from cell text.
|
49
|
+
*/
|
50
|
+
export declare const rsnFromElement: (el: Element | null) => string;
|
51
|
+
/**
|
52
|
+
* Will run an Axios `GET` request against a given URL after injecting a `User-Agent` header.
|
53
|
+
*
|
54
|
+
* @param url URL to run a `GET` request against.
|
55
|
+
* @returns Axios response.
|
56
|
+
*/
|
57
|
+
export declare const httpGet: <Response_1>(url: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<Response_1>>;
|
58
|
+
/**
|
59
|
+
* Validates that a provided RSN has the same username restrictions as Jagex.
|
60
|
+
* @param rsn Username to validate.
|
61
|
+
* @throws Error if the RSN fails validation.
|
62
|
+
*/
|
63
|
+
export declare const validateRSN: (rsn: string) => void;
|