@blizzard-api/wow 2.0.0 → 2.0.2

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.js CHANGED
@@ -1,19 +1,5 @@
1
1
  // src/account-profile/account-profile.ts
2
2
  var accountProfileBase = "/profile/user/wow";
3
- function accountProfileSummary(token) {
4
- return {
5
- namespace: "profile",
6
- path: `${accountProfileBase}`,
7
- token
8
- };
9
- }
10
- function protectedCharacterProfileSummary(realmId, characterId, token) {
11
- return {
12
- namespace: "profile",
13
- path: `${accountProfileBase}/protected-character/${realmId}-${characterId}`,
14
- token
15
- };
16
- }
17
3
  function accountCollectionsIndex(token) {
18
4
  return {
19
5
  namespace: "profile",
@@ -42,6 +28,13 @@ function accountPetsCollectionSummary(token) {
42
28
  token
43
29
  };
44
30
  }
31
+ function accountProfileSummary(token) {
32
+ return {
33
+ namespace: "profile",
34
+ path: `${accountProfileBase}`,
35
+ token
36
+ };
37
+ }
45
38
  function accountToysCollectionSummary(token) {
46
39
  return {
47
40
  namespace: "profile",
@@ -56,6 +49,13 @@ function accountTransmogsCollectionSummary(token) {
56
49
  token
57
50
  };
58
51
  }
52
+ function protectedCharacterProfileSummary(realmId, characterId, token) {
53
+ return {
54
+ namespace: "profile",
55
+ path: `${accountProfileBase}/protected-character/${realmId}-${characterId}`,
56
+ token
57
+ };
58
+ }
59
59
 
60
60
  // src/base.ts
61
61
  var base = "/data/wow";
@@ -65,22 +65,22 @@ var searchBase = `${base}/search`;
65
65
  // src/achievements/achievements.ts
66
66
  var achievementBase = `${base}/achievement`;
67
67
  var achievementCategoryBase = `${base}/achievement-category`;
68
- function achievementCategory(achievementCategoryId) {
68
+ function achievement(achievementId) {
69
69
  return {
70
70
  namespace: "static",
71
- path: `${achievementCategoryBase}/${achievementCategoryId}`
71
+ path: `${achievementBase}/${achievementId}`
72
72
  };
73
73
  }
74
- function achievementCategoryIndex() {
74
+ function achievementCategory(achievementCategoryId) {
75
75
  return {
76
76
  namespace: "static",
77
- path: `${achievementCategoryBase}/index`
77
+ path: `${achievementCategoryBase}/${achievementCategoryId}`
78
78
  };
79
79
  }
80
- function achievement(achievementId) {
80
+ function achievementCategoryIndex() {
81
81
  return {
82
82
  namespace: "static",
83
- path: `${achievementBase}/${achievementId}`
83
+ path: `${achievementCategoryBase}/index`
84
84
  };
85
85
  }
86
86
  function achievementIndex() {
@@ -199,16 +199,16 @@ function characterTransmogCollectionSummary(realmSlug, characterName) {
199
199
 
200
200
  // src/character-encounters/character-encounters.ts
201
201
  var bathPase = "profile/wow/character";
202
- function characterEncountersSummary(realmSlug, characterName) {
202
+ function characterDungeons(realmSlug, characterName) {
203
203
  return {
204
204
  namespace: "profile",
205
- path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters`
205
+ path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters/dungeons`
206
206
  };
207
207
  }
208
- function characterDungeons(realmSlug, characterName) {
208
+ function characterEncountersSummary(realmSlug, characterName) {
209
209
  return {
210
210
  namespace: "profile",
211
- path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters/dungeons`
211
+ path: `${bathPase}/${realmSlug}/${characterName.toLowerCase()}/encounters`
212
212
  };
213
213
  }
214
214
  function characterRaids(realmSlug, characterName) {
@@ -265,16 +265,16 @@ function characterProfessionsSummary(realmSlug, characterName) {
265
265
  }
266
266
 
267
267
  // src/character-profile/character-profile.ts
268
- function characterProfileSummary(realmSlug, characterName) {
268
+ function characterProfileStatus(realmSlug, characterName) {
269
269
  return {
270
270
  namespace: "profile",
271
- path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}`
271
+ path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}/status`
272
272
  };
273
273
  }
274
- function characterProfileStatus(realmSlug, characterName) {
274
+ function characterProfileSummary(realmSlug, characterName) {
275
275
  return {
276
276
  namespace: "profile",
277
- path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}/status`
277
+ path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}`
278
278
  };
279
279
  }
280
280
 
@@ -287,16 +287,16 @@ function characterPvpSummary(realmSlug, characterName) {
287
287
  }
288
288
 
289
289
  // src/character-quests/character-quests.ts
290
- function characterQuests(realmSlug, characterName) {
290
+ function characterCompletedQuests(realmSlug, characterName) {
291
291
  return {
292
292
  namespace: "profile",
293
- path: `/profile/wow/character/${realmSlug}/${characterName}/quests`
293
+ path: `/profile/wow/character/${realmSlug}/${characterName}/quests/completed`
294
294
  };
295
295
  }
296
- function characterCompletedQuests(realmSlug, characterName) {
296
+ function characterQuests(realmSlug, characterName) {
297
297
  return {
298
298
  namespace: "profile",
299
- path: `/profile/wow/character/${realmSlug}/${characterName}/quests/completed`
299
+ path: `/profile/wow/character/${realmSlug}/${characterName}/quests`
300
300
  };
301
301
  }
302
302
 
@@ -341,16 +341,16 @@ function characterTitlesSummary(realmSlug, characterName) {
341
341
  }
342
342
 
343
343
  // src/connected-realm/connected-realm.ts
344
- function connectedRealmIndex() {
344
+ function connectedRealm(connectedRealmId) {
345
345
  return {
346
346
  namespace: "dynamic",
347
- path: `${base}/connected-realm/index`
347
+ path: `${base}/connected-realm/${connectedRealmId}`
348
348
  };
349
349
  }
350
- function connectedRealm(connectedRealmId) {
350
+ function connectedRealmIndex() {
351
351
  return {
352
352
  namespace: "dynamic",
353
- path: `${base}/connected-realm/${connectedRealmId}`
353
+ path: `${base}/connected-realm/index`
354
354
  };
355
355
  }
356
356
  function connectedRealmSearch(options) {
@@ -441,6 +441,17 @@ function creatureFamilyMedia(creatureFamilyId) {
441
441
  path: `${mediaBase}/creature-family/${creatureFamilyId}`
442
442
  };
443
443
  }
444
+ function creatureSearch(options) {
445
+ return {
446
+ namespace: "static",
447
+ parameters: {
448
+ _page: options._page,
449
+ [`name.${options.locale}`]: options.name,
450
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
451
+ },
452
+ path: `${searchBase}/creature`
453
+ };
454
+ }
444
455
  function creatureType(creatureTypeId) {
445
456
  return {
446
457
  namespace: "static",
@@ -453,15 +464,24 @@ function creatureTypeIndex() {
453
464
  path: `${base}/creature-type/index`
454
465
  };
455
466
  }
456
- function creatureSearch(options) {
467
+
468
+ // src/guild-crest/guild-crest.ts
469
+ function guildCrestBorder(borderId) {
457
470
  return {
458
471
  namespace: "static",
459
- parameters: {
460
- _page: options._page,
461
- [`name.${options.locale}`]: options.name,
462
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
463
- },
464
- path: `${searchBase}/creature`
472
+ path: `${mediaBase}/guild-crest/border/${borderId}`
473
+ };
474
+ }
475
+ function guildCrestComponentsIndex() {
476
+ return {
477
+ namespace: "static",
478
+ path: `${base}/guild-crest/index`
479
+ };
480
+ }
481
+ function guildCrestEmblem(emblemId) {
482
+ return {
483
+ namespace: "static",
484
+ path: `${mediaBase}/guild-crest/emblem/${emblemId}`
465
485
  };
466
486
  }
467
487
 
@@ -473,16 +493,16 @@ function guild(realmSlug, nameSlug) {
473
493
  path: `${basePath3}/${realmSlug}/${nameSlug}`
474
494
  };
475
495
  }
476
- function guildActivity(realmSlug, nameSlug) {
496
+ function guildAchievements(realmSlug, nameSlug) {
477
497
  return {
478
498
  namespace: "profile",
479
- path: `${basePath3}/${realmSlug}/${nameSlug}/activity`
499
+ path: `${basePath3}/${realmSlug}/${nameSlug}/achievements`
480
500
  };
481
501
  }
482
- function guildAchievements(realmSlug, nameSlug) {
502
+ function guildActivity(realmSlug, nameSlug) {
483
503
  return {
484
504
  namespace: "profile",
485
- path: `${basePath3}/${realmSlug}/${nameSlug}/achievements`
505
+ path: `${basePath3}/${realmSlug}/${nameSlug}/activity`
486
506
  };
487
507
  }
488
508
  function guildRoster(realmSlug, nameSlug) {
@@ -492,26 +512,6 @@ function guildRoster(realmSlug, nameSlug) {
492
512
  };
493
513
  }
494
514
 
495
- // src/guild-crest/guild-crest.ts
496
- function guildCrestComponentsIndex() {
497
- return {
498
- namespace: "static",
499
- path: `${base}/guild-crest/index`
500
- };
501
- }
502
- function guildCrestBorder(borderId) {
503
- return {
504
- namespace: "static",
505
- path: `${mediaBase}/guild-crest/border/${borderId}`
506
- };
507
- }
508
- function guildCrestEmblem(emblemId) {
509
- return {
510
- namespace: "static",
511
- path: `${mediaBase}/guild-crest/emblem/${emblemId}`
512
- };
513
- }
514
-
515
515
  // src/heirloom/heirloom.ts
516
516
  function heirloom(heirloomId) {
517
517
  return {
@@ -539,12 +539,6 @@ function itemClass(itemClassId) {
539
539
  path: `${base}/item-class/${itemClassId}`
540
540
  };
541
541
  }
542
- function itemSubClass(itemClassId, itemSubclassId) {
543
- return {
544
- namespace: "static",
545
- path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
546
- };
547
- }
548
542
  function itemClassIndex() {
549
543
  return {
550
544
  namespace: "static",
@@ -557,6 +551,17 @@ function itemMedia(itemId) {
557
551
  path: `${mediaBase}/item/${itemId}`
558
552
  };
559
553
  }
554
+ function itemSearch(options) {
555
+ return {
556
+ namespace: "static",
557
+ parameters: {
558
+ _page: options._page,
559
+ [`name.${options.locale}`]: options.name,
560
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
561
+ },
562
+ path: `${searchBase}/item`
563
+ };
564
+ }
560
565
  function itemSet(itemSetId) {
561
566
  return {
562
567
  namespace: "static",
@@ -569,15 +574,10 @@ function itemSetIndex() {
569
574
  path: `${base}/item-set/index`
570
575
  };
571
576
  }
572
- function itemSearch(options) {
577
+ function itemSubClass(itemClassId, itemSubclassId) {
573
578
  return {
574
579
  namespace: "static",
575
- parameters: {
576
- _page: options._page,
577
- [`name.${options.locale}`]: options.name,
578
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
579
- },
580
- path: `${searchBase}/item`
580
+ path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
581
581
  };
582
582
  }
583
583
 
@@ -799,34 +799,34 @@ function pet(petId) {
799
799
  path: `${base}/pet/${petId}`
800
800
  };
801
801
  }
802
- function petIndex() {
802
+ function petAbility(petAbilityId) {
803
803
  return {
804
804
  namespace: "static",
805
- path: `${base}/pet/index`
805
+ path: `${base}/pet-ability/${petAbilityId}`
806
806
  };
807
807
  }
808
- function petMedia(petId) {
808
+ function petAbilityIndex() {
809
809
  return {
810
810
  namespace: "static",
811
- path: `${mediaBase}/pet/${petId}`
811
+ path: `${base}/pet-ability/index`
812
812
  };
813
813
  }
814
- function petAbility(petAbilityId) {
814
+ function petAbilityMedia(petAbilityId) {
815
815
  return {
816
816
  namespace: "static",
817
- path: `${base}/pet-ability/${petAbilityId}`
817
+ path: `${mediaBase}/pet-ability/${petAbilityId}`
818
818
  };
819
819
  }
820
- function petAbilityIndex() {
820
+ function petIndex() {
821
821
  return {
822
822
  namespace: "static",
823
- path: `${base}/pet-ability/index`
823
+ path: `${base}/pet/index`
824
824
  };
825
825
  }
826
- function petAbilityMedia(petAbilityId) {
826
+ function petMedia(petId) {
827
827
  return {
828
828
  namespace: "static",
829
- path: `${mediaBase}/pet-ability/${petAbilityId}`
829
+ path: `${mediaBase}/pet/${petId}`
830
830
  };
831
831
  }
832
832
 
@@ -1001,12 +1001,6 @@ function quest(questId) {
1001
1001
  path: `${base}/quest/${questId}`
1002
1002
  };
1003
1003
  }
1004
- function questIndex() {
1005
- return {
1006
- namespace: "static",
1007
- path: `${base}/quest/index`
1008
- };
1009
- }
1010
1004
  function questArea(questAreaId) {
1011
1005
  return {
1012
1006
  namespace: "static",
@@ -1031,6 +1025,12 @@ function questCategoryIndex() {
1031
1025
  path: `${base}/quest/category/index`
1032
1026
  };
1033
1027
  }
1028
+ function questIndex() {
1029
+ return {
1030
+ namespace: "static",
1031
+ path: `${base}/quest/index`
1032
+ };
1033
+ }
1034
1034
  function questType(questTypeId) {
1035
1035
  return {
1036
1036
  namespace: "static",