osrs-json-hiscores 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,6 +110,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
110
110
  | Bounty Hunter (Hunter) | `hunterBH` |
111
111
  | Last Man Standing | `lastManStanding` |
112
112
  | Soul Wars Zeal | `soulWarsZeal` |
113
+ | Rifts Closed | `riftsClosed` |
113
114
 
114
115
  ### Leagues
115
116
 
@@ -193,6 +194,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
193
194
  bountyHunter: {},
194
195
  lastManStanding: {},
195
196
  soulWarsZeal: {},
197
+ riftsClosed: {},
196
198
  bosses: {}
197
199
  }
198
200
  }
package/lib/hiscores.js CHANGED
@@ -105,7 +105,7 @@ function parseStats(csv) {
105
105
  .split('\n')
106
106
  .filter(function (entry) { return !!entry; })
107
107
  .map(function (stat) { return stat.split(','); });
108
- if (splitCSV.length !== utils_1.SKILLS.length + utils_1.BH_MODES.length + utils_1.CLUES.length + utils_1.BOSSES.length + 3) {
108
+ if (splitCSV.length !== utils_1.SKILLS.length + utils_1.BH_MODES.length + utils_1.CLUES.length + utils_1.BOSSES.length + 4) {
109
109
  throw Error(utils_1.INVALID_FORMAT_ERROR);
110
110
  }
111
111
  var skillObjects = splitCSV
@@ -132,7 +132,7 @@ function parseStats(csv) {
132
132
  var leaguePoints = activityObjects.splice(0, 1)[0];
133
133
  var bhObjects = activityObjects.splice(0, utils_1.BH_MODES.length);
134
134
  var clueObjects = activityObjects.splice(0, utils_1.CLUES.length);
135
- var _a = activityObjects.splice(0, 2), lastManStanding = _a[0], soulWarsZeal = _a[1];
135
+ var _a = activityObjects.splice(0, 3), lastManStanding = _a[0], soulWarsZeal = _a[1], riftsClosed = _a[2];
136
136
  var bossObjects = activityObjects.splice(0, utils_1.BOSSES.length);
137
137
  var skills = skillObjects.reduce(function (prev, curr, index) {
138
138
  var newSkills = __assign({}, prev);
@@ -160,6 +160,7 @@ function parseStats(csv) {
160
160
  bountyHunter: bountyHunter,
161
161
  lastManStanding: lastManStanding,
162
162
  soulWarsZeal: soulWarsZeal,
163
+ riftsClosed: riftsClosed,
163
164
  clues: clues,
164
165
  bosses: bosses
165
166
  };
package/lib/types.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare type Boss = 'abyssalSire' | 'alchemicalHydra' | 'barrows' | 'bryo
24
24
  export declare type Bosses = {
25
25
  [Type in Boss]: Activity;
26
26
  };
27
- export declare type ActivityName = 'leaguePoints' | 'hunterBH' | 'rogueBH' | 'lastManStanding' | 'soulWarsZeal' | 'allClues' | 'beginnerClues' | 'easyClues' | 'mediumClues' | 'hardClues' | 'eliteClues' | 'masterClues' | Boss;
27
+ export declare type ActivityName = 'leaguePoints' | 'hunterBH' | 'rogueBH' | 'lastManStanding' | 'soulWarsZeal' | 'riftsClosed' | 'allClues' | 'beginnerClues' | 'easyClues' | 'mediumClues' | 'hardClues' | 'eliteClues' | 'masterClues' | Boss;
28
28
  export interface Stats {
29
29
  skills: Skills;
30
30
  clues: Clues;
@@ -32,6 +32,7 @@ export interface Stats {
32
32
  bountyHunter: BH;
33
33
  lastManStanding: Activity;
34
34
  soulWarsZeal: Activity;
35
+ riftsClosed: Activity;
35
36
  bosses: Bosses;
36
37
  }
37
38
  export declare type Modes = {
@@ -31,4 +31,5 @@ export declare const FORMATTED_BH_NAMES: FormattedBHNames;
31
31
  export declare const FORMATTED_LMS = "Last Man Standing";
32
32
  export declare const FORMATTED_SOUL_WARS = "Soul Wars Zeal";
33
33
  export declare const FORMATTED_LEAGUE_POINTS = "League Points";
34
+ export declare const FORMATTED_RIFTS_CLOSED = "Rifts Closed";
34
35
  export declare const INVALID_FORMAT_ERROR = "Invalid hiscores format";
@@ -5,7 +5,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
5
5
  return to;
6
6
  };
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.INVALID_FORMAT_ERROR = exports.FORMATTED_LEAGUE_POINTS = exports.FORMATTED_SOUL_WARS = 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;
8
+ exports.INVALID_FORMAT_ERROR = exports.FORMATTED_RIFTS_CLOSED = exports.FORMATTED_LEAGUE_POINTS = exports.FORMATTED_SOUL_WARS = 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;
9
9
  exports.BASE_URL = 'https://secure.runescape.com/m=hiscore_oldschool';
10
10
  exports.STATS_URL = 'index_lite.ws?player=';
11
11
  exports.SCORES_URL = 'overall.ws?';
@@ -125,7 +125,8 @@ exports.ACTIVITIES = __spreadArray([
125
125
  'eliteClues',
126
126
  'masterClues',
127
127
  'lastManStanding',
128
- 'soulWarsZeal'
128
+ 'soulWarsZeal',
129
+ 'riftsClosed'
129
130
  ], exports.BOSSES);
130
131
  exports.FORMATTED_BOSS_NAMES = {
131
132
  abyssalSire: 'Abyssal Sire',
@@ -219,4 +220,5 @@ exports.FORMATTED_BH_NAMES = {
219
220
  exports.FORMATTED_LMS = 'Last Man Standing';
220
221
  exports.FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
221
222
  exports.FORMATTED_LEAGUE_POINTS = 'League Points';
223
+ exports.FORMATTED_RIFTS_CLOSED = 'Rifts Closed';
222
224
  exports.INVALID_FORMAT_ERROR = 'Invalid hiscores format';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osrs-json-hiscores",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "The Old School Runescape API wrapper that does more!",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",