@wise-old-man/utils 2.0.10 → 2.0.12
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/dist/index.d.ts +11 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export type Prisma_Base_Delta = {
|
|
|
84
84
|
nightmare: number
|
|
85
85
|
phosanis_nightmare: number
|
|
86
86
|
obor: number
|
|
87
|
+
phantom_muspah: number
|
|
87
88
|
sarachnis: number
|
|
88
89
|
scorpia: number
|
|
89
90
|
skotizo: number
|
|
@@ -333,6 +334,8 @@ export type Prisma_Base_Snapshot = {
|
|
|
333
334
|
nightmareKills: number
|
|
334
335
|
oborRank: number
|
|
335
336
|
oborKills: number
|
|
337
|
+
phantom_muspahRank: number
|
|
338
|
+
phantom_muspahKills: number
|
|
336
339
|
sarachnisRank: number
|
|
337
340
|
sarachnisKills: number
|
|
338
341
|
scorpiaRank: number
|
|
@@ -507,6 +510,7 @@ declare const Boss: {
|
|
|
507
510
|
readonly NIGHTMARE: "nightmare";
|
|
508
511
|
readonly PHOSANIS_NIGHTMARE: "phosanis_nightmare";
|
|
509
512
|
readonly OBOR: "obor";
|
|
513
|
+
readonly PHANTOM_MUSPAH: "phantom_muspah";
|
|
510
514
|
readonly SARACHNIS: "sarachnis";
|
|
511
515
|
readonly SCORPIA: "scorpia";
|
|
512
516
|
readonly SKOTIZO: "skotizo";
|
|
@@ -567,6 +571,7 @@ declare const Metric: {
|
|
|
567
571
|
readonly NIGHTMARE: "nightmare";
|
|
568
572
|
readonly PHOSANIS_NIGHTMARE: "phosanis_nightmare";
|
|
569
573
|
readonly OBOR: "obor";
|
|
574
|
+
readonly PHANTOM_MUSPAH: "phantom_muspah";
|
|
570
575
|
readonly SARACHNIS: "sarachnis";
|
|
571
576
|
readonly SCORPIA: "scorpia";
|
|
572
577
|
readonly SKOTIZO: "skotizo";
|
|
@@ -1617,6 +1622,7 @@ declare const MetricProps: {
|
|
|
1617
1622
|
readonly nightmare: BossProperties;
|
|
1618
1623
|
readonly phosanis_nightmare: BossProperties;
|
|
1619
1624
|
readonly obor: BossProperties;
|
|
1625
|
+
readonly phantom_muspah: BossProperties;
|
|
1620
1626
|
readonly sarachnis: BossProperties;
|
|
1621
1627
|
readonly scorpia: BossProperties;
|
|
1622
1628
|
readonly skotizo: BossProperties;
|
|
@@ -1966,6 +1972,11 @@ declare class PlayersClient extends BaseAPIClient {
|
|
|
1966
1972
|
* @returns The player's details, including the latest snapshot.
|
|
1967
1973
|
*/
|
|
1968
1974
|
getPlayerDetails(username: string): Promise<PlayerDetails>;
|
|
1975
|
+
/**
|
|
1976
|
+
* Fetches a player's details by ID.
|
|
1977
|
+
* @returns The player's details, including the latest snapshot.
|
|
1978
|
+
*/
|
|
1979
|
+
getPlayerDetailsById(id: number): Promise<PlayerDetails>;
|
|
1969
1980
|
/**
|
|
1970
1981
|
* Fetches a player's current achievements.
|
|
1971
1982
|
* @returns A list of achievements.
|
package/dist/index.js
CHANGED
|
@@ -338,6 +338,13 @@ class PlayersClient extends BaseAPIClient {
|
|
|
338
338
|
getPlayerDetails(username) {
|
|
339
339
|
return this.getRequest(`/players/${username}`);
|
|
340
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Fetches a player's details by ID.
|
|
343
|
+
* @returns The player's details, including the latest snapshot.
|
|
344
|
+
*/
|
|
345
|
+
getPlayerDetailsById(id) {
|
|
346
|
+
return this.getRequest(`/players/id/${id}`);
|
|
347
|
+
}
|
|
341
348
|
/**
|
|
342
349
|
* Fetches a player's current achievements.
|
|
343
350
|
* @returns A list of achievements.
|
|
@@ -535,6 +542,7 @@ const Boss = {
|
|
|
535
542
|
NIGHTMARE: 'nightmare',
|
|
536
543
|
PHOSANIS_NIGHTMARE: 'phosanis_nightmare',
|
|
537
544
|
OBOR: 'obor',
|
|
545
|
+
PHANTOM_MUSPAH: 'phantom_muspah',
|
|
538
546
|
SARACHNIS: 'sarachnis',
|
|
539
547
|
SCORPIA: 'scorpia',
|
|
540
548
|
SKOTIZO: 'skotizo',
|
|
@@ -1834,6 +1842,7 @@ const BossProps = lodash.mapValues({
|
|
|
1834
1842
|
[Boss.NIGHTMARE]: { name: 'Nightmare' },
|
|
1835
1843
|
[Boss.PHOSANIS_NIGHTMARE]: { name: "Phosani's Nightmare" },
|
|
1836
1844
|
[Boss.OBOR]: { name: 'Obor', minimumValue: 5, isMembers: false },
|
|
1845
|
+
[Boss.PHANTOM_MUSPAH]: { name: 'Phantom Muspah', minimumValue: 50 },
|
|
1837
1846
|
[Boss.SARACHNIS]: { name: 'Sarachnis' },
|
|
1838
1847
|
[Boss.SKOTIZO]: { name: 'Skotizo', minimumValue: 5 },
|
|
1839
1848
|
[Boss.SCORPIA]: { name: 'Scorpia' },
|
|
@@ -2002,6 +2011,9 @@ function parseMetricAbbreviation(abbreviation) {
|
|
|
2002
2011
|
case 'guardians':
|
|
2003
2012
|
case 'ggs':
|
|
2004
2013
|
return Metric.GROTESQUE_GUARDIANS;
|
|
2014
|
+
case 'phantom':
|
|
2015
|
+
case 'muspah':
|
|
2016
|
+
return Metric.PHANTOM_MUSPAH;
|
|
2005
2017
|
case 'kq':
|
|
2006
2018
|
return Metric.KALPHITE_QUEEN;
|
|
2007
2019
|
case 'kbd':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise-old-man/utils",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "A JavaScript/TypeScript client that interfaces and consumes the Wise Old Man API, an API that tracks and measures players' progress in Old School Runescape.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wiseoldman",
|