@blizzard-api/classic-wow 1.0.0 → 1.1.1

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
@@ -4,603 +4,415 @@ var mediaBase = `${base}/media`;
4
4
  var searchBase = `${base}/search`;
5
5
 
6
6
  // src/auction-house/auction-house.ts
7
- var classicAuctionHouseApi = {
8
- /**
9
- * Returns an index of auction houses for a connected realm.
10
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
11
- * @param connectedRealmId The ID of the connected realm.
12
- * @returns The auction house index. See {@link AuctionHouseIndexResponse}.
13
- */
14
- auctionHouseIndex: (namespace, connectedRealmId) => {
15
- return {
16
- path: `${base}/connected-realm/${connectedRealmId}/auctions/index`,
17
- namespace
18
- };
19
- },
20
- /**
21
- * Returns all active auctions for a specific auction house on a connected realm.
22
- *
23
- * Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
24
- *
25
- * Depending on the number of active auctions on the specified connected realm, the response from this endpoint may be rather large, sometimes exceeding 10 MB.
26
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
27
- * @param connectedRealmId The ID of the connected realm.
28
- * @param auctionHouseId The ID of the auction house.
29
- * @returns The auction house data. See {@link AuctionsResponse}.
30
- */
31
- auctions: (namespace, connectedRealmId, auctionHouseId) => {
32
- return {
33
- path: `${base}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`,
34
- namespace
35
- };
36
- }
37
- };
7
+ function auctionHouseIndex(namespace, connectedRealmId) {
8
+ return {
9
+ path: `${base}/connected-realm/${connectedRealmId}/auctions/index`,
10
+ namespace
11
+ };
12
+ }
13
+ function auctions(namespace, connectedRealmId, auctionHouseId) {
14
+ return {
15
+ path: `${base}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`,
16
+ namespace
17
+ };
18
+ }
38
19
 
39
20
  // src/connected-realm/connected-realm.ts
40
- var classicConnectedRealmApi = {
41
- /**
42
- * Returns an index of connected realms.
43
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
44
- * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
45
- */
46
- connectedRealmIndex: (namespace) => {
47
- return {
48
- path: `${base}/connected-realm/index`,
49
- namespace
50
- };
51
- },
52
- /**
53
- * Returns a connected realm by ID.
54
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
55
- * @param connectedRealmId The connected realm ID.
56
- * @returns The connected realm. See {@link ConnectedRealmResponse}.
57
- */
58
- connectedRealm: (namespace, connectedRealmId) => {
59
- return {
60
- path: `${base}/connected-realm/${connectedRealmId}`,
61
- namespace
62
- };
63
- },
64
- /**
65
- * Performs a search of connected realms.
66
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
67
- * @param options The search parameters. See {@link ConnectedRealmSearchParameters}.
68
- * @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}.
69
- */
70
- connectedRealmSearch: (namespace, options) => {
71
- return {
72
- namespace,
73
- parameters: {
74
- _page: options._page,
75
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
76
- "status.type": options["status.type"],
77
- "realms.timezone": options["realms.timezone"]
78
- },
79
- path: `${base}/search/connected-realm`
80
- };
81
- }
82
- };
21
+ function connectedRealmIndex(namespace) {
22
+ return {
23
+ path: `${base}/connected-realm/index`,
24
+ namespace
25
+ };
26
+ }
27
+ function connectedRealm(namespace, connectedRealmId) {
28
+ return {
29
+ path: `${base}/connected-realm/${connectedRealmId}`,
30
+ namespace
31
+ };
32
+ }
33
+ function connectedRealmSearch(namespace, options) {
34
+ return {
35
+ namespace,
36
+ parameters: {
37
+ _page: options._page,
38
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
39
+ "status.type": options["status.type"],
40
+ "realms.timezone": options["realms.timezone"]
41
+ },
42
+ path: `${base}/search/connected-realm`
43
+ };
44
+ }
83
45
 
84
46
  // src/creature/creature.ts
85
- var classicCreatureApi = {
86
- /**
87
- * Returns a creature by ID.
88
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
89
- * @param creatureId The creature ID.
90
- * @returns The creature. See {@link CreatureResponse}.
91
- */
92
- creature: (namespace, creatureId) => {
93
- return {
94
- path: `${base}/creature/${creatureId}`,
95
- namespace
96
- };
97
- },
98
- /**
99
- * Returns media for a creature display by ID.
100
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
101
- * @param creatureDisplayId The creature display ID.
102
- * @returns The creature display media. See {@link CreatureDisplayMediaResponse}.
103
- */
104
- creatureDisplayMedia: (namespace, creatureDisplayId) => {
105
- return {
106
- path: `${mediaBase}/creature-display/${creatureDisplayId}`,
107
- namespace
108
- };
109
- },
110
- /**
111
- * Returns a creature family by ID.
112
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
113
- * @param creatureFamilyId The creature family ID.
114
- * @returns The creature family. See {@link CreatureFamilyResponse}.
115
- */
116
- creatureFamily: (namespace, creatureFamilyId) => {
117
- return {
118
- path: `${base}/creature-family/${creatureFamilyId}`,
119
- namespace
120
- };
121
- },
122
- /**
123
- * Returns an index of creature families.
124
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
125
- * @returns The creature family index. See {@link CreatureFamilyIndexResponse}.
126
- */
127
- creatureFamilyIndex: (namespace) => {
128
- return {
129
- path: `${base}/creature-family/index`,
130
- namespace
131
- };
132
- },
133
- /**
134
- * Returns media for a creature family by ID.
135
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
136
- * @param creatureFamilyId The creature family ID.
137
- * @returns The creature family media. See {@link CreatureFamilyMediaResponse}.
138
- */
139
- creatureFamilyMedia: (namespace, creatureFamilyId) => {
140
- return {
141
- path: `${mediaBase}/creature-family/${creatureFamilyId}`,
142
- namespace
143
- };
144
- },
145
- /**
146
- * Returns a creature type by ID.
147
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
148
- * @param creatureTypeId The creature type ID.
149
- * @returns The creature type. See {@link CreatureTypeResponse}.
150
- */
151
- creatureType: (namespace, creatureTypeId) => {
152
- return {
153
- path: `${base}/creature-type/${creatureTypeId}`,
154
- namespace
155
- };
156
- },
157
- /**
158
- * Returns an index of creature types.
159
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
160
- * @returns The creature type index. See {@link CreatureTypeIndexResponse}.
161
- */
162
- creatureTypeIndex: (namespace) => {
163
- return {
164
- path: `${base}/creature-type/index`,
165
- namespace
166
- };
167
- },
168
- /**
169
- * Performs a search of creatures.
170
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
171
- * @param options The creature search parameters. See {@link CreatureSearchParameters}.
172
- * @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
173
- */
174
- creatureSearch: (namespace, options) => {
175
- return {
176
- namespace,
177
- parameters: {
178
- _page: options._page,
179
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
180
- [`name.${options.locale}`]: options.name
181
- },
182
- path: `${searchBase}/creature`
183
- };
184
- }
185
- };
47
+ function creature(namespace, creatureId) {
48
+ return {
49
+ path: `${base}/creature/${creatureId}`,
50
+ namespace
51
+ };
52
+ }
53
+ function creatureDisplayMedia(namespace, creatureDisplayId) {
54
+ return {
55
+ path: `${mediaBase}/creature-display/${creatureDisplayId}`,
56
+ namespace
57
+ };
58
+ }
59
+ function creatureFamily(namespace, creatureFamilyId) {
60
+ return {
61
+ path: `${base}/creature-family/${creatureFamilyId}`,
62
+ namespace
63
+ };
64
+ }
65
+ function creatureFamilyIndex(namespace) {
66
+ return {
67
+ path: `${base}/creature-family/index`,
68
+ namespace
69
+ };
70
+ }
71
+ function creatureFamilyMedia(namespace, creatureFamilyId) {
72
+ return {
73
+ path: `${mediaBase}/creature-family/${creatureFamilyId}`,
74
+ namespace
75
+ };
76
+ }
77
+ function creatureType(namespace, creatureTypeId) {
78
+ return {
79
+ path: `${base}/creature-type/${creatureTypeId}`,
80
+ namespace
81
+ };
82
+ }
83
+ function creatureTypeIndex(namespace) {
84
+ return {
85
+ path: `${base}/creature-type/index`,
86
+ namespace
87
+ };
88
+ }
89
+ function creatureSearch(namespace, options) {
90
+ return {
91
+ namespace,
92
+ parameters: {
93
+ _page: options._page,
94
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
95
+ [`name.${options.locale}`]: options.name
96
+ },
97
+ path: `${searchBase}/creature`
98
+ };
99
+ }
186
100
 
187
101
  // src/guild-crest/guild-crest.ts
188
- var classicGuildCrestApi = {
189
- /**
190
- * Returns an index of guild crest media.
191
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
192
- * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
193
- */
194
- guildCrestComponentsIndex: (namespace) => {
195
- return {
196
- path: `${base}/guild-crest/index`,
197
- namespace
198
- };
199
- },
200
- /**
201
- * Returns media for a guild crest border by ID.
202
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
203
- * @param borderId The guild crest border ID.
204
- * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.
205
- */
206
- guildCrestBorder: (namespace, borderId) => {
207
- return {
208
- path: `${mediaBase}/guild-crest/border/${borderId}`,
209
- namespace
210
- };
211
- },
212
- /**
213
- * Returns media for a guild crest emblem by ID.
214
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
215
- * @param emblemId The guild crest emblem ID.
216
- * @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.
217
- */
218
- guildCrestEmblem: (namespace, emblemId) => {
219
- return {
220
- path: `${mediaBase}/guild-crest/emblem/${emblemId}`,
221
- namespace
222
- };
223
- }
224
- };
102
+ function guildCrestComponentsIndex(namespace) {
103
+ return {
104
+ path: `${base}/guild-crest/index`,
105
+ namespace
106
+ };
107
+ }
108
+ function guildCrestBorder(namespace, borderId) {
109
+ return {
110
+ path: `${mediaBase}/guild-crest/border/${borderId}`,
111
+ namespace
112
+ };
113
+ }
114
+ function guildCrestEmblem(namespace, emblemId) {
115
+ return {
116
+ path: `${mediaBase}/guild-crest/emblem/${emblemId}`,
117
+ namespace
118
+ };
119
+ }
225
120
 
226
121
  // src/item/item.ts
227
- var classicItemApi = {
228
- /**
229
- * Get an item class index.
230
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
231
- * @returns The item class index. See {@link ItemClassIndexResponse}.
232
- */
233
- itemClassIndex: (namespace) => {
234
- return {
235
- path: `${base}/item-class/index`,
236
- namespace
237
- };
238
- },
239
- /**
240
- * Get an item class by ID.
241
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
242
- * @param itemClassId The item class ID.
243
- * @returns The item class. See {@link ItemClassResponse}.
244
- */
245
- itemClass: (namespace, itemClassId) => {
246
- return {
247
- namespace,
248
- path: `${base}/item-class/${itemClassId}`
249
- };
250
- },
251
- /**
252
- * Get an item subclass by ID.
253
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
254
- * @param itemClassId The item class ID.
255
- * @param itemSubclassId The item subclass ID.
256
- * @returns The item subclass. See {@link ItemSubClassResponse}.
257
- */
258
- itemSubClass: (namespace, itemClassId, itemSubclassId) => {
259
- return {
260
- namespace,
261
- path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
262
- };
263
- },
264
- /**
265
- * Get an item by ID.
266
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
267
- * @param itemId The item ID.
268
- * @returns The item. See {@link ItemResponse}.
269
- */
270
- item: (namespace, itemId) => {
271
- return {
272
- namespace,
273
- path: `${base}/item/${itemId}`
274
- };
275
- },
276
- /**
277
- * Get item media by ID.
278
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
279
- * @param itemId The item ID.
280
- * @returns The item media. See {@link ItemMediaResponse}.
281
- */
282
- itemMedia: (namespace, itemId) => {
283
- return {
284
- namespace,
285
- path: `${mediaBase}/item/${itemId}`
286
- };
287
- },
288
- /**
289
- * Search for items.
290
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
291
- * @param options The search parameters. See {@link ItemSearchParameters}.
292
- * @returns The search results. See {@link SearchResponse}.
293
- */
294
- itemSearch: (namespace, options) => {
295
- return {
296
- namespace,
297
- parameters: {
298
- _page: options._page,
299
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
300
- [`name.${options.locale}`]: options.name
301
- },
302
- path: `${searchBase}/item`
303
- };
304
- }
305
- };
122
+ function itemClassIndex(namespace) {
123
+ return {
124
+ path: `${base}/item-class/index`,
125
+ namespace
126
+ };
127
+ }
128
+ function itemClass(namespace, itemClassId) {
129
+ return {
130
+ namespace,
131
+ path: `${base}/item-class/${itemClassId}`
132
+ };
133
+ }
134
+ function itemSubClass(namespace, itemClassId, itemSubclassId) {
135
+ return {
136
+ namespace,
137
+ path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
138
+ };
139
+ }
140
+ function item(namespace, itemId) {
141
+ return {
142
+ namespace,
143
+ path: `${base}/item/${itemId}`
144
+ };
145
+ }
146
+ function itemMedia(namespace, itemId) {
147
+ return {
148
+ namespace,
149
+ path: `${mediaBase}/item/${itemId}`
150
+ };
151
+ }
152
+ function itemSearch(namespace, options) {
153
+ return {
154
+ namespace,
155
+ parameters: {
156
+ _page: options._page,
157
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
158
+ [`name.${options.locale}`]: options.name
159
+ },
160
+ path: `${searchBase}/item`
161
+ };
162
+ }
306
163
 
307
164
  // src/media-search/media-search.ts
308
- var classicMediaSearchApi = {
309
- /**
310
- * Search for media.
311
- * @param options The search parameters. See {@link MediaSearchParameters}.
312
- * @returns The search results. See {@link SearchResponse}.
313
- */
314
- mediaSearch: (namespace, options) => {
315
- return {
316
- namespace,
317
- parameters: {
318
- _page: options._page,
319
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
320
- tags: options.tags
321
- },
322
- path: `${searchBase}/media`
323
- };
324
- }
325
- };
165
+ function mediaSearch(namespace, options) {
166
+ return {
167
+ namespace,
168
+ parameters: {
169
+ _page: options._page,
170
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
171
+ tags: options.tags
172
+ },
173
+ path: `${searchBase}/media`
174
+ };
175
+ }
326
176
 
327
177
  // src/playable-class/playable-class.ts
328
- var classicPlayableClassApi = {
329
- /**
330
- * Get a playable class by ID.
331
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
332
- * @param playableClassId The playable class ID.
333
- * @returns The playable class. See {@link PlayableClassResponse}.
334
- */
335
- playableClass: (namespace, playableClassId) => {
336
- return {
337
- namespace,
338
- path: `${base}/playable-class/${playableClassId}`
339
- };
340
- },
341
- /**
342
- * Get a playable class index.
343
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
344
- * @returns The playable class index. See {@link PlayableClassIndexResponse}.
345
- */
346
- playableClassIndex: (namespace) => {
347
- return {
348
- namespace,
349
- path: `${base}/playable-class/index`
350
- };
351
- },
352
- /**
353
- * Get playable class media by ID.
354
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
355
- * @param playableClassId The playable class ID.
356
- * @returns The playable class media. See {@link PlayableClassMediaResponse}.
357
- */
358
- playableClassMedia: (namespace, playableClassId) => {
359
- return {
360
- namespace,
361
- path: `${mediaBase}/playable-class/${playableClassId}`
362
- };
363
- }
364
- };
178
+ function playableClass(namespace, playableClassId) {
179
+ return {
180
+ namespace,
181
+ path: `${base}/playable-class/${playableClassId}`
182
+ };
183
+ }
184
+ function playableClassIndex(namespace) {
185
+ return {
186
+ namespace,
187
+ path: `${base}/playable-class/index`
188
+ };
189
+ }
190
+ function playableClassMedia(namespace, playableClassId) {
191
+ return {
192
+ namespace,
193
+ path: `${mediaBase}/playable-class/${playableClassId}`
194
+ };
195
+ }
365
196
 
366
197
  // src/playable-race/playable-race.ts
367
- var classicPlayableRaceApi = {
368
- /**
369
- * Get a playable race by ID.
370
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
371
- * @param playableRaceId The playable race ID.
372
- * @returns The playable race. See {@link PlayableRaceResponse}.
373
- */
374
- playableRace: (namespace, playableRaceId) => {
375
- return {
376
- namespace,
377
- path: `${base}/playable-race/${playableRaceId}`
378
- };
379
- },
380
- /**
381
- * Get a playable race index.
382
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
383
- * @returns The playable race index. See {@link PlayableRaceIndexResponse}.
384
- */
385
- playableRaceIndex: (namespace) => {
386
- return {
387
- namespace,
388
- path: `${base}/playable-race/index`
389
- };
390
- }
391
- };
198
+ function playableRace(namespace, playableRaceId) {
199
+ return {
200
+ namespace,
201
+ path: `${base}/playable-race/${playableRaceId}`
202
+ };
203
+ }
204
+ function playableRaceIndex(namespace) {
205
+ return {
206
+ namespace,
207
+ path: `${base}/playable-race/index`
208
+ };
209
+ }
392
210
 
393
211
  // src/power-type/power-type.ts
394
- var classicPowerTypeApi = {
395
- /**
396
- * Get a power type by ID.
397
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
398
- * @param powerTypeId The power type ID.
399
- * @returns The power type. See {@link PowerTypeResponse}.
400
- */
401
- powerType: (namespace, powerTypeId) => {
402
- return {
403
- namespace,
404
- path: `${base}/power-type/${powerTypeId}`
405
- };
406
- },
407
- /**
408
- * Get a power type index.
409
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
410
- * @returns The power type index. See {@link PowerTypeIndexResponse}.
411
- */
412
- powerTypeIndex: (namespace) => {
413
- return {
414
- namespace,
415
- path: `${base}/power-type/index`
416
- };
417
- }
418
- };
212
+ function powerType(namespace, powerTypeId) {
213
+ return {
214
+ namespace,
215
+ path: `${base}/power-type/${powerTypeId}`
216
+ };
217
+ }
218
+ function powerTypeIndex(namespace) {
219
+ return {
220
+ namespace,
221
+ path: `${base}/power-type/index`
222
+ };
223
+ }
419
224
 
420
225
  // src/pvp-season/pvp-season.ts
421
- var classicPvpSeasonApi = {
422
- /**
423
- * Get a PvP season index.
424
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
425
- * @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
426
- */
427
- pvpSeasonIndex: (namespace) => {
428
- return {
429
- namespace,
430
- path: `${base}/pvp-season/index`
431
- };
432
- },
433
- /**
434
- * Get a PvP season by ID.
435
- * @param pvpSeasonId The PvP season ID.
436
- * @returns The PvP season. See {@link PvpSeasonResponse}.
437
- */
438
- pvpSeason: (namespace, pvpSeasonId) => {
439
- return {
440
- namespace,
441
- path: `${base}/pvp-season/${pvpSeasonId}`
442
- };
443
- },
444
- /**
445
- * Returns an index of PvP Regions.
446
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
447
- */
448
- pvpRegionIndex: (namespace) => {
449
- return {
450
- namespace,
451
- path: `${base}/pvp-region/index`
452
- };
453
- },
454
- /**
455
- * Returns an index of PvP Seasons in a PvP region.
456
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
457
- * @param pvpRegionId The PvP region ID.
458
- * @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
459
- */
460
- pvpRegionalSeasonIndex: (namespace, pvpRegionId) => {
461
- return {
462
- namespace,
463
- path: `${base}/pvp-region/${pvpRegionId}/pvp-season/index`
464
- };
465
- },
466
- /**
467
- * Returns a PvP season by region ID and season ID.
468
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
469
- * @param pvpRegionId The PvP region ID.
470
- * @param pvpSeasonId The PvP season ID.
471
- */
472
- pvpRegionalSeason: (namespace, pvpRegionId, pvpSeasonId) => {
473
- return {
474
- namespace,
475
- path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`
476
- };
477
- },
478
- /**
479
- * Returns an index of PvP leaderboards for a PvP season in a given PvP region.
480
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
481
- * @param pvpRegionId The PvP region ID.
482
- * @param pvpSeasonId The PvP season ID.
483
- */
484
- pvpLeaderboardIndex: (namespace, pvpRegionId, pvpSeasonId) => {
485
- return {
486
- namespace,
487
- path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`
488
- };
489
- },
490
- /**
491
- * Get a PvP leaderboard by PvP season ID and bracket.
492
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
493
- * @param pvpRegionId The PvP region ID.
494
- * @param pvpSeasonId The PvP season ID.
495
- * @param pvpBracket The PvP bracket.
496
- */
497
- pvpLeaderboard: (namespace, pvpRegionId, pvpSeasonId, pvpBracket) => {
498
- return {
499
- namespace,
500
- path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`
501
- };
502
- },
503
- /**
504
- * Returns an index of PvP rewards for a PvP season in a given PvP region.
505
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
506
- * @param pvpRegionId The PvP region ID.
507
- * @param pvpSeasonId The PvP season ID.
508
- */
509
- pvpRewardsIndex: (namespace, pvpRegionId, pvpSeasonId) => {
510
- return {
511
- namespace,
512
- path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`
513
- };
514
- }
515
- };
226
+ function pvpSeasonIndex(namespace) {
227
+ return {
228
+ namespace,
229
+ path: `${base}/pvp-season/index`
230
+ };
231
+ }
232
+ function pvpSeason(namespace, pvpSeasonId) {
233
+ return {
234
+ namespace,
235
+ path: `${base}/pvp-season/${pvpSeasonId}`
236
+ };
237
+ }
238
+ function pvpRegionIndex(namespace) {
239
+ return {
240
+ namespace,
241
+ path: `${base}/pvp-region/index`
242
+ };
243
+ }
244
+ function pvpRegionalSeasonIndex(namespace, pvpRegionId) {
245
+ return {
246
+ namespace,
247
+ path: `${base}/pvp-region/${pvpRegionId}/pvp-season/index`
248
+ };
249
+ }
250
+ function pvpRegionalSeason(namespace, pvpRegionId, pvpSeasonId) {
251
+ return {
252
+ namespace,
253
+ path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`
254
+ };
255
+ }
256
+ function pvpLeaderboardIndex(namespace, pvpRegionId, pvpSeasonId) {
257
+ return {
258
+ namespace,
259
+ path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`
260
+ };
261
+ }
262
+ function pvpLeaderboard(namespace, pvpRegionId, pvpSeasonId, pvpBracket) {
263
+ return {
264
+ namespace,
265
+ path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`
266
+ };
267
+ }
268
+ function pvpRewardsIndex(namespace, pvpRegionId, pvpSeasonId) {
269
+ return {
270
+ namespace,
271
+ path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`
272
+ };
273
+ }
516
274
 
517
275
  // src/realm/realm.ts
518
- var classicRealmApi = {
519
- /**
520
- * Get a realm by slug.
521
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
522
- * @param realmSlug The realm slug.
523
- * @returns The realm. See {@link RealmResponse}.
524
- */
525
- realm: (namespace, realmSlug) => {
526
- return {
527
- path: `${base}/realm/${realmSlug}`,
528
- namespace
529
- };
530
- },
531
- /**
532
- * Get a realm index.
533
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
534
- * @returns The realm index. See {@link RealmIndexResponse}.
535
- */
536
- realmIndex: (namespace) => {
537
- return {
538
- path: `${base}/realm/index`,
539
- namespace
540
- };
541
- },
542
- /**
543
- * Search for realms.
544
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
545
- * @param options The search parameters. See {@link RealmSearchParameters}.
546
- * @returns The search results. See {@link SearchResponse}.
547
- */
548
- realmSearch: (namespace, options) => {
549
- return {
550
- namespace,
551
- parameters: {
552
- _page: options._page,
553
- orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
554
- timezone: options.timezone
555
- },
556
- path: `${searchBase}/realm`
557
- };
558
- }
559
- };
276
+ function realm(namespace, realmSlug) {
277
+ return {
278
+ path: `${base}/realm/${realmSlug}`,
279
+ namespace
280
+ };
281
+ }
282
+ function realmIndex(namespace) {
283
+ return {
284
+ path: `${base}/realm/index`,
285
+ namespace
286
+ };
287
+ }
288
+ function realmSearch(namespace, options) {
289
+ return {
290
+ namespace,
291
+ parameters: {
292
+ _page: options._page,
293
+ orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
294
+ timezone: options.timezone
295
+ },
296
+ path: `${searchBase}/realm`
297
+ };
298
+ }
560
299
 
561
300
  // src/region/region.ts
562
- var classicRegionApi = {
563
- /**
564
- * Get a region by ID.
565
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
566
- * @param regionId The region ID.
567
- * @returns The region. See {@link RegionResponse}.
568
- */
569
- region: (namespace, regionId) => {
570
- return {
571
- path: `${base}/region/${regionId}`,
572
- namespace
573
- };
574
- },
575
- /**
576
- * Get a region index.
577
- * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
578
- * @returns The region index. See {@link RegionIndexResponse}.
579
- */
580
- regionIndex: (namespace) => {
581
- return {
582
- path: `${base}/region/index`,
583
- namespace
584
- };
585
- }
586
- };
301
+ function region(namespace, regionId) {
302
+ return {
303
+ path: `${base}/region/${regionId}`,
304
+ namespace
305
+ };
306
+ }
307
+ function regionIndex(namespace) {
308
+ return {
309
+ path: `${base}/region/index`,
310
+ namespace
311
+ };
312
+ }
587
313
 
588
314
  // src/index.ts
589
315
  var classicWow = {
590
- ...classicAuctionHouseApi,
591
- ...classicConnectedRealmApi,
592
- ...classicCreatureApi,
593
- ...classicGuildCrestApi,
594
- ...classicItemApi,
595
- ...classicMediaSearchApi,
596
- ...classicPlayableClassApi,
597
- ...classicPlayableRaceApi,
598
- ...classicPowerTypeApi,
599
- ...classicPvpSeasonApi,
600
- ...classicRealmApi,
601
- ...classicRegionApi
316
+ //Auction House
317
+ auctionHouseIndex,
318
+ auctions,
319
+ //Connected Realm
320
+ connectedRealm,
321
+ connectedRealmIndex,
322
+ connectedRealmSearch,
323
+ //Creature
324
+ creature,
325
+ creatureDisplayMedia,
326
+ creatureFamily,
327
+ creatureFamilyIndex,
328
+ creatureFamilyMedia,
329
+ creatureType,
330
+ creatureTypeIndex,
331
+ creatureSearch,
332
+ //Guild Crest
333
+ guildCrestComponentsIndex,
334
+ guildCrestBorder,
335
+ guildCrestEmblem,
336
+ //Item
337
+ itemClassIndex,
338
+ itemClass,
339
+ itemSubClass,
340
+ item,
341
+ itemMedia,
342
+ itemSearch,
343
+ //Media Search
344
+ mediaSearch,
345
+ //Playable Class
346
+ playableClass,
347
+ playableClassIndex,
348
+ playableClassMedia,
349
+ //Playable Race
350
+ playableRace,
351
+ playableRaceIndex,
352
+ //Power Type
353
+ powerType,
354
+ powerTypeIndex,
355
+ //Pvp Season
356
+ pvpSeasonIndex,
357
+ pvpSeason,
358
+ pvpRegionIndex,
359
+ pvpRegionalSeasonIndex,
360
+ pvpRegionalSeason,
361
+ pvpLeaderboardIndex,
362
+ pvpLeaderboard,
363
+ pvpRewardsIndex,
364
+ //Realm
365
+ realm,
366
+ realmIndex,
367
+ realmSearch,
368
+ //Region
369
+ region,
370
+ regionIndex
602
371
  };
603
372
  export {
604
- classicWow
373
+ auctionHouseIndex,
374
+ auctions,
375
+ classicWow,
376
+ connectedRealm,
377
+ connectedRealmIndex,
378
+ connectedRealmSearch,
379
+ creature,
380
+ creatureDisplayMedia,
381
+ creatureFamily,
382
+ creatureFamilyIndex,
383
+ creatureFamilyMedia,
384
+ creatureSearch,
385
+ creatureType,
386
+ creatureTypeIndex,
387
+ guildCrestBorder,
388
+ guildCrestComponentsIndex,
389
+ guildCrestEmblem,
390
+ item,
391
+ itemClass,
392
+ itemClassIndex,
393
+ itemMedia,
394
+ itemSearch,
395
+ itemSubClass,
396
+ mediaSearch,
397
+ playableClass,
398
+ playableClassIndex,
399
+ playableClassMedia,
400
+ playableRace,
401
+ playableRaceIndex,
402
+ powerType,
403
+ powerTypeIndex,
404
+ pvpLeaderboard,
405
+ pvpLeaderboardIndex,
406
+ pvpRegionIndex,
407
+ pvpRegionalSeason,
408
+ pvpRegionalSeasonIndex,
409
+ pvpRewardsIndex,
410
+ pvpSeason,
411
+ pvpSeasonIndex,
412
+ realm,
413
+ realmIndex,
414
+ realmSearch,
415
+ region,
416
+ regionIndex
605
417
  };
606
418
  //# sourceMappingURL=index.js.map