@blizzard-api/classic-wow 2.1.1 → 2.1.3
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 +849 -744
- package/dist/index.js +956 -365
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,496 +1,1087 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var mediaBase = `${base}/media`;
|
|
4
|
-
var searchBase = `${base}/search`;
|
|
1
|
+
//#region ../wow/src/base.ts
|
|
2
|
+
/**
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
* @file base.ts
|
|
5
|
+
|
|
6
|
+
* @module base
|
|
7
|
+
|
|
8
|
+
* @description Contains base constants and interfaces for the Blizzard API.
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
|
|
13
|
+
* The base request path for the Blizzard API for world of warcraft.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
const base = "/data/wow";
|
|
17
|
+
/**
|
|
18
|
+
|
|
19
|
+
* The base request path for media in the Blizzard API for world of warcraft.
|
|
20
|
+
|
|
21
|
+
*/
|
|
22
|
+
const mediaBase = `${base}/media`;
|
|
23
|
+
/**
|
|
24
|
+
|
|
25
|
+
* The base request path for search in the Blizzard API for world of warcraft.
|
|
26
|
+
|
|
27
|
+
*/
|
|
28
|
+
const searchBase = `${base}/search`;
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/auction-house/auction-house.ts
|
|
32
|
+
/**
|
|
33
|
+
|
|
34
|
+
* Returns an index of auction houses for a connected realm.
|
|
35
|
+
|
|
36
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
37
|
+
|
|
38
|
+
* @param connectedRealmId The ID of the connected realm.
|
|
39
|
+
|
|
40
|
+
* @returns The auction house index. See {@link AuctionHouseIndexResponse}.
|
|
41
|
+
|
|
42
|
+
*/
|
|
7
43
|
function auctionHouseIndex(namespace, connectedRealmId) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
44
|
+
return {
|
|
45
|
+
namespace,
|
|
46
|
+
path: `${base}/connected-realm/${connectedRealmId}/auctions/index`
|
|
47
|
+
};
|
|
12
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
|
|
51
|
+
* Returns all active auctions for a specific auction house on a connected realm.
|
|
52
|
+
|
|
53
|
+
*
|
|
54
|
+
|
|
55
|
+
* Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
|
|
56
|
+
|
|
57
|
+
*
|
|
58
|
+
|
|
59
|
+
* 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.
|
|
60
|
+
|
|
61
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
62
|
+
|
|
63
|
+
* @param connectedRealmId The ID of the connected realm.
|
|
64
|
+
|
|
65
|
+
* @param auctionHouseId The ID of the auction house.
|
|
66
|
+
|
|
67
|
+
* @returns The auction house data. See {@link AuctionsResponse}.
|
|
68
|
+
|
|
69
|
+
*/
|
|
13
70
|
function auctions(namespace, connectedRealmId, auctionHouseId) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
71
|
+
return {
|
|
72
|
+
namespace,
|
|
73
|
+
path: `${base}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`
|
|
74
|
+
};
|
|
18
75
|
}
|
|
19
76
|
|
|
20
|
-
|
|
21
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/base.ts
|
|
79
|
+
/**
|
|
80
|
+
* The base request path for the character API for Classic World of Warcraft.
|
|
81
|
+
*/
|
|
82
|
+
const characterBase = "profile/wow/character";
|
|
22
83
|
|
|
23
|
-
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/character-achievements/character-achievements.ts
|
|
86
|
+
/**
|
|
87
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}. Note: This API is not supported for classic era realms.
|
|
88
|
+
* @param realmSlug The slug of the realm.
|
|
89
|
+
* @param characterName The lowercase name of the character.
|
|
90
|
+
* @returns a summary of the achievements a character has completed.
|
|
91
|
+
*/
|
|
24
92
|
function characterAchievementsSummary(namespace, realmSlug, characterName) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
93
|
+
return {
|
|
94
|
+
namespace,
|
|
95
|
+
path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements`
|
|
96
|
+
};
|
|
29
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}. Note: This API is not supported for classic era realms.
|
|
100
|
+
* @param realmSlug The slug of the realm.
|
|
101
|
+
* @param characterName The lowercase name of the character.
|
|
102
|
+
* @returns a character's statistics as they pertain to achievements.
|
|
103
|
+
*/
|
|
30
104
|
function characterAchievementStatistics(namespace, realmSlug, characterName) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
105
|
+
return {
|
|
106
|
+
namespace,
|
|
107
|
+
path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`
|
|
108
|
+
};
|
|
35
109
|
}
|
|
36
110
|
|
|
37
|
-
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/character-equipment/character-equipment.ts
|
|
113
|
+
/**
|
|
114
|
+
* Returns a summary of the items equipped by a character.
|
|
115
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
116
|
+
* @param realmSlug The realm slug.
|
|
117
|
+
* @param characterName The character name.
|
|
118
|
+
* @returns The character equipment summary.
|
|
119
|
+
*/
|
|
38
120
|
function characterEquipmentSummary(namespace, realmSlug, characterName) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
121
|
+
return {
|
|
122
|
+
namespace,
|
|
123
|
+
path: `${characterBase}/${realmSlug}/${characterName}/equipment`
|
|
124
|
+
};
|
|
43
125
|
}
|
|
44
126
|
|
|
45
|
-
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/character-hunter-pets/character-hunter-pets.ts
|
|
129
|
+
/**
|
|
130
|
+
* If the character is a hunter, returns a summary of the character's hunter pets. Otherwise, returns an HTTP 404 Not Found error.
|
|
131
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
132
|
+
* @param realmSlug The slug of the realm.
|
|
133
|
+
* @param characterName The lowercase name of the character.
|
|
134
|
+
* @returns a summary of the character's hunter pets.
|
|
135
|
+
*/
|
|
46
136
|
function characterHunterPetsSummary(namespace, realmSlug, characterName) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
137
|
+
return {
|
|
138
|
+
namespace,
|
|
139
|
+
path: `${characterBase}/${realmSlug}/${characterName}/hunter-pets`
|
|
140
|
+
};
|
|
51
141
|
}
|
|
52
142
|
|
|
53
|
-
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/character-media/character-media.ts
|
|
145
|
+
/**
|
|
146
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
147
|
+
* @param realmSlug The slug of the realm.
|
|
148
|
+
* @param characterName The lowercase name of the character.
|
|
149
|
+
* @returns a summary of the media assets available for a character (such as an avatar render).
|
|
150
|
+
*/
|
|
54
151
|
function characterMediaSummary(namespace, realmSlug, characterName) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
152
|
+
return {
|
|
153
|
+
namespace,
|
|
154
|
+
path: `${characterBase}/${realmSlug}/${characterName}/character-media`
|
|
155
|
+
};
|
|
59
156
|
}
|
|
60
157
|
|
|
61
|
-
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/character-profile/character-profile.ts
|
|
160
|
+
/**
|
|
161
|
+
* Returns the status and a unique ID for a character. A client should delete information about a character from their application if any of the following conditions occur:
|
|
162
|
+
* - an HTTP 404 Not Found error is returned
|
|
163
|
+
* - the is_valid value is false
|
|
164
|
+
* - the returned character ID doesn't match the previously recorded value for the character
|
|
165
|
+
*
|
|
166
|
+
* The following example illustrates how to use this endpoint:
|
|
167
|
+
*
|
|
168
|
+
* 1. A client requests and stores information about a character, including its unique character ID and the timestamp of the request.
|
|
169
|
+
* 2. After 30 days, the client makes a request to the status endpoint to verify if the character information is still valid.
|
|
170
|
+
* 3. If character cannot be found, is not valid, or the characters IDs do not match, the client removes the information from their application.
|
|
171
|
+
* 4. If the character is valid and the character IDs match, the client retains the data for another 30 days.
|
|
172
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
173
|
+
* @param realmSlug The slug of the realm.
|
|
174
|
+
* @param characterName The lowercase name of the character.
|
|
175
|
+
* @returns the status of the character profile for a character.
|
|
176
|
+
*/
|
|
62
177
|
function characterProfileStatus(namespace, realmSlug, characterName) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
178
|
+
return {
|
|
179
|
+
namespace,
|
|
180
|
+
path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}/status`
|
|
181
|
+
};
|
|
67
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns a summary of the character profile for a character.
|
|
185
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
186
|
+
* @param realmSlug The slug of the realm.
|
|
187
|
+
* @param characterName The lowercase name of the character.
|
|
188
|
+
* @returns a summary of the character profile for a character.
|
|
189
|
+
*/
|
|
68
190
|
function characterProfileSummary(namespace, realmSlug, characterName) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
191
|
+
return {
|
|
192
|
+
namespace,
|
|
193
|
+
path: `${characterBase}/${realmSlug}/${characterName.toLowerCase()}`
|
|
194
|
+
};
|
|
73
195
|
}
|
|
74
196
|
|
|
75
|
-
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/character-specialization/character-specialization.ts
|
|
199
|
+
/**
|
|
200
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
201
|
+
* @param realmSlug The slug of the realm.
|
|
202
|
+
* @param characterName The lowercase name of the character.
|
|
203
|
+
* @returns a summary of a character's specializations.
|
|
204
|
+
*/
|
|
76
205
|
function characterSpecializationsSummary(namespace, realmSlug, characterName) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
206
|
+
return {
|
|
207
|
+
namespace,
|
|
208
|
+
path: `${characterBase}/${realmSlug}/${characterName}/specializations`
|
|
209
|
+
};
|
|
81
210
|
}
|
|
82
211
|
|
|
83
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/character-statistics/character-statistics.ts
|
|
214
|
+
/**
|
|
215
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
216
|
+
* @param realmSlug The slug of the realm.
|
|
217
|
+
* @param characterName The lowercase name of the character.
|
|
218
|
+
* @returns a statistics summary for a character.
|
|
219
|
+
*/
|
|
84
220
|
function characterStatisticsSummary(namespace, realmSlug, characterName) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
221
|
+
return {
|
|
222
|
+
namespace,
|
|
223
|
+
path: `${characterBase}/${realmSlug}/${characterName}/statistics`
|
|
224
|
+
};
|
|
89
225
|
}
|
|
90
226
|
|
|
91
|
-
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/connected-realm/connected-realm.ts
|
|
229
|
+
/**
|
|
230
|
+
|
|
231
|
+
* Returns a connected realm by ID.
|
|
232
|
+
|
|
233
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
234
|
+
|
|
235
|
+
* @param connectedRealmId The connected realm ID.
|
|
236
|
+
|
|
237
|
+
* @returns The connected realm. See {@link ConnectedRealmResponse}.
|
|
238
|
+
|
|
239
|
+
*/
|
|
92
240
|
function connectedRealm(namespace, connectedRealmId) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
241
|
+
return {
|
|
242
|
+
namespace,
|
|
243
|
+
path: `${base}/connected-realm/${connectedRealmId}`
|
|
244
|
+
};
|
|
97
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
|
|
248
|
+
* Returns an index of connected realms.
|
|
249
|
+
|
|
250
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
251
|
+
|
|
252
|
+
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
|
|
253
|
+
|
|
254
|
+
*/
|
|
98
255
|
function connectedRealmIndex(namespace) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
256
|
+
return {
|
|
257
|
+
namespace,
|
|
258
|
+
path: `${base}/connected-realm/index`
|
|
259
|
+
};
|
|
103
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
|
|
263
|
+
* Performs a search of connected realms.
|
|
264
|
+
|
|
265
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
266
|
+
|
|
267
|
+
* @param options The search parameters. See {@link ConnectedRealmSearchParameters}.
|
|
268
|
+
|
|
269
|
+
* @returns The search results. See {@link SearchResponse} & {@link ConnectedRealmSearchResponseItem}.
|
|
270
|
+
|
|
271
|
+
*/
|
|
104
272
|
function connectedRealmSearch(namespace, options) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
273
|
+
return {
|
|
274
|
+
namespace,
|
|
275
|
+
parameters: {
|
|
276
|
+
_page: options._page,
|
|
277
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
278
|
+
"realms.timezone": options["realms.timezone"],
|
|
279
|
+
"status.type": options["status.type"]
|
|
280
|
+
},
|
|
281
|
+
path: `${base}/search/connected-realm`
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/creature/creature.ts
|
|
287
|
+
/**
|
|
288
|
+
|
|
289
|
+
* Returns a creature by ID.
|
|
290
|
+
|
|
291
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
292
|
+
|
|
293
|
+
* @param creatureId The creature ID.
|
|
294
|
+
|
|
295
|
+
* @returns The creature. See {@link CreatureResponse}.
|
|
296
|
+
|
|
297
|
+
*/
|
|
118
298
|
function creature(namespace, creatureId) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
299
|
+
return {
|
|
300
|
+
namespace,
|
|
301
|
+
path: `${base}/creature/${creatureId}`
|
|
302
|
+
};
|
|
123
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
|
|
306
|
+
* Returns media for a creature display by ID.
|
|
307
|
+
|
|
308
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
309
|
+
|
|
310
|
+
* @param creatureDisplayId The creature display ID.
|
|
311
|
+
|
|
312
|
+
* @returns The creature display media. See {@link CreatureDisplayMediaResponse}.
|
|
313
|
+
|
|
314
|
+
*/
|
|
124
315
|
function creatureDisplayMedia(namespace, creatureDisplayId) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
316
|
+
return {
|
|
317
|
+
namespace,
|
|
318
|
+
path: `${mediaBase}/creature-display/${creatureDisplayId}`
|
|
319
|
+
};
|
|
129
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
|
|
323
|
+
* Returns a creature family by ID.
|
|
324
|
+
|
|
325
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
326
|
+
|
|
327
|
+
* @param creatureFamilyId The creature family ID.
|
|
328
|
+
|
|
329
|
+
* @returns The creature family. See {@link CreatureFamilyResponse}.
|
|
330
|
+
|
|
331
|
+
*/
|
|
130
332
|
function creatureFamily(namespace, creatureFamilyId) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
333
|
+
return {
|
|
334
|
+
namespace,
|
|
335
|
+
path: `${base}/creature-family/${creatureFamilyId}`
|
|
336
|
+
};
|
|
135
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
|
|
340
|
+
* Returns an index of creature families.
|
|
341
|
+
|
|
342
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
343
|
+
|
|
344
|
+
* @returns The creature family index. See {@link CreatureFamilyIndexResponse}.
|
|
345
|
+
|
|
346
|
+
*/
|
|
136
347
|
function creatureFamilyIndex(namespace) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
348
|
+
return {
|
|
349
|
+
namespace,
|
|
350
|
+
path: `${base}/creature-family/index`
|
|
351
|
+
};
|
|
141
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
|
|
355
|
+
* Returns media for a creature family by ID.
|
|
356
|
+
|
|
357
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
358
|
+
|
|
359
|
+
* @param creatureFamilyId The creature family ID.
|
|
360
|
+
|
|
361
|
+
* @returns The creature family media. See {@link CreatureFamilyMediaResponse}.
|
|
362
|
+
|
|
363
|
+
*/
|
|
142
364
|
function creatureFamilyMedia(namespace, creatureFamilyId) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
365
|
+
return {
|
|
366
|
+
namespace,
|
|
367
|
+
path: `${mediaBase}/creature-family/${creatureFamilyId}`
|
|
368
|
+
};
|
|
147
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
|
|
372
|
+
* Performs a search of creatures.
|
|
373
|
+
|
|
374
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
375
|
+
|
|
376
|
+
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
|
|
377
|
+
|
|
378
|
+
* @returns The creature search results. See {@link SearchResponse} & {@link CreatureSearchResponseItem}.
|
|
379
|
+
|
|
380
|
+
*/
|
|
148
381
|
function creatureSearch(namespace, options) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
382
|
+
return {
|
|
383
|
+
namespace,
|
|
384
|
+
parameters: {
|
|
385
|
+
_page: options._page,
|
|
386
|
+
[`name.${options.locale}`]: options.name,
|
|
387
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
|
|
388
|
+
},
|
|
389
|
+
path: `${searchBase}/creature`
|
|
390
|
+
};
|
|
158
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
|
|
394
|
+
* Returns a creature type by ID.
|
|
395
|
+
|
|
396
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
397
|
+
|
|
398
|
+
* @param creatureTypeId The creature type ID.
|
|
399
|
+
|
|
400
|
+
* @returns The creature type. See {@link CreatureTypeResponse}.
|
|
401
|
+
|
|
402
|
+
*/
|
|
159
403
|
function creatureType(namespace, creatureTypeId) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
404
|
+
return {
|
|
405
|
+
namespace,
|
|
406
|
+
path: `${base}/creature-type/${creatureTypeId}`
|
|
407
|
+
};
|
|
164
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
|
|
411
|
+
* Returns an index of creature types.
|
|
412
|
+
|
|
413
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
414
|
+
|
|
415
|
+
* @returns The creature type index. See {@link CreatureTypeIndexResponse}.
|
|
416
|
+
|
|
417
|
+
*/
|
|
165
418
|
function creatureTypeIndex(namespace) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
419
|
+
return {
|
|
420
|
+
namespace,
|
|
421
|
+
path: `${base}/creature-type/index`
|
|
422
|
+
};
|
|
170
423
|
}
|
|
171
424
|
|
|
172
|
-
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region src/guild-crest/guild-crest.ts
|
|
427
|
+
/**
|
|
428
|
+
|
|
429
|
+
* Returns media for a guild crest border by ID.
|
|
430
|
+
|
|
431
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
432
|
+
|
|
433
|
+
* @param borderId The guild crest border ID.
|
|
434
|
+
|
|
435
|
+
* @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.
|
|
436
|
+
|
|
437
|
+
*/
|
|
173
438
|
function guildCrestBorder(namespace, borderId) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
439
|
+
return {
|
|
440
|
+
namespace,
|
|
441
|
+
path: `${mediaBase}/guild-crest/border/${borderId}`
|
|
442
|
+
};
|
|
178
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
|
|
446
|
+
* Returns an index of guild crest media.
|
|
447
|
+
|
|
448
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
449
|
+
|
|
450
|
+
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
|
|
451
|
+
|
|
452
|
+
*/
|
|
179
453
|
function guildCrestComponentsIndex(namespace) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
454
|
+
return {
|
|
455
|
+
namespace,
|
|
456
|
+
path: `${base}/guild-crest/index`
|
|
457
|
+
};
|
|
184
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
|
|
461
|
+
* Returns media for a guild crest emblem by ID.
|
|
462
|
+
|
|
463
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
464
|
+
|
|
465
|
+
* @param emblemId The guild crest emblem ID.
|
|
466
|
+
|
|
467
|
+
* @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.
|
|
468
|
+
|
|
469
|
+
*/
|
|
185
470
|
function guildCrestEmblem(namespace, emblemId) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
471
|
+
return {
|
|
472
|
+
namespace,
|
|
473
|
+
path: `${mediaBase}/guild-crest/emblem/${emblemId}`
|
|
474
|
+
};
|
|
190
475
|
}
|
|
191
476
|
|
|
192
|
-
|
|
193
|
-
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/guild/guild.ts
|
|
479
|
+
const basePath = "/data/wow/guild";
|
|
480
|
+
/**
|
|
481
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
482
|
+
* @param realmSlug The slug of the realm.
|
|
483
|
+
* @param nameSlug The lowercase name of the guild.
|
|
484
|
+
* @returns a single guild by its name and realm.
|
|
485
|
+
*/
|
|
194
486
|
function guild(namespace, realmSlug, nameSlug) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
487
|
+
return {
|
|
488
|
+
namespace,
|
|
489
|
+
path: `${basePath}/${realmSlug}/${nameSlug}`
|
|
490
|
+
};
|
|
199
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
494
|
+
* @param realmSlug The slug of the realm.
|
|
495
|
+
* @param nameSlug The lowercase name of the guild.
|
|
496
|
+
* @returns a single guild's achievements by name and realm.
|
|
497
|
+
*/
|
|
200
498
|
function guildAchievements(namespace, realmSlug, nameSlug) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
};
|
|
499
|
+
return {
|
|
500
|
+
namespace,
|
|
501
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/achievements`
|
|
502
|
+
};
|
|
206
503
|
}
|
|
504
|
+
/**
|
|
505
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
506
|
+
* @param realmSlug The slug of the realm.
|
|
507
|
+
* @param nameSlug The lowercase name of the guild.
|
|
508
|
+
* @returns a single guild's activity by name and realm.
|
|
509
|
+
*/
|
|
207
510
|
function guildActivity(namespace, realmSlug, nameSlug) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
511
|
+
return {
|
|
512
|
+
namespace,
|
|
513
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/activity`
|
|
514
|
+
};
|
|
212
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
518
|
+
* @param realmSlug The slug of the realm.
|
|
519
|
+
* @param nameSlug The lowercase name of the guild.
|
|
520
|
+
* @returns a single guild's roster by its name and realm.
|
|
521
|
+
*/
|
|
213
522
|
function guildRoster(namespace, realmSlug, nameSlug) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
523
|
+
return {
|
|
524
|
+
namespace,
|
|
525
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/roster`
|
|
526
|
+
};
|
|
218
527
|
}
|
|
219
528
|
|
|
220
|
-
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region src/item/item.ts
|
|
531
|
+
/**
|
|
532
|
+
|
|
533
|
+
* Get an item by ID.
|
|
534
|
+
|
|
535
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
536
|
+
|
|
537
|
+
* @param itemId The item ID.
|
|
538
|
+
|
|
539
|
+
* @returns The item. See {@link ItemResponse}.
|
|
540
|
+
|
|
541
|
+
*/
|
|
221
542
|
function item(namespace, itemId) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
543
|
+
return {
|
|
544
|
+
namespace,
|
|
545
|
+
path: `${base}/item/${itemId}`
|
|
546
|
+
};
|
|
226
547
|
}
|
|
548
|
+
/**
|
|
549
|
+
|
|
550
|
+
* Get an item class by ID.
|
|
551
|
+
|
|
552
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
553
|
+
|
|
554
|
+
* @param itemClassId The item class ID.
|
|
555
|
+
|
|
556
|
+
* @returns The item class. See {@link ItemClassResponse}.
|
|
557
|
+
|
|
558
|
+
*/
|
|
227
559
|
function itemClass(namespace, itemClassId) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
560
|
+
return {
|
|
561
|
+
namespace,
|
|
562
|
+
path: `${base}/item-class/${itemClassId}`
|
|
563
|
+
};
|
|
232
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
|
|
567
|
+
* Get an item class index.
|
|
568
|
+
|
|
569
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
570
|
+
|
|
571
|
+
* @returns The item class index. See {@link ItemClassIndexResponse}.
|
|
572
|
+
|
|
573
|
+
*/
|
|
233
574
|
function itemClassIndex(namespace) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
575
|
+
return {
|
|
576
|
+
namespace,
|
|
577
|
+
path: `${base}/item-class/index`
|
|
578
|
+
};
|
|
238
579
|
}
|
|
580
|
+
/**
|
|
581
|
+
|
|
582
|
+
* Get item media by ID.
|
|
583
|
+
|
|
584
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
585
|
+
|
|
586
|
+
* @param itemId The item ID.
|
|
587
|
+
|
|
588
|
+
* @returns The item media. See {@link ItemMediaResponse}.
|
|
589
|
+
|
|
590
|
+
*/
|
|
239
591
|
function itemMedia(namespace, itemId) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
592
|
+
return {
|
|
593
|
+
namespace,
|
|
594
|
+
path: `${mediaBase}/item/${itemId}`
|
|
595
|
+
};
|
|
244
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
|
|
599
|
+
* Search for items.
|
|
600
|
+
|
|
601
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
602
|
+
|
|
603
|
+
* @param options The search parameters. See {@link ItemSearchParameters}.
|
|
604
|
+
|
|
605
|
+
* @returns The search results. See {@link SearchResponse}.
|
|
606
|
+
|
|
607
|
+
*/
|
|
245
608
|
function itemSearch(namespace, options) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
609
|
+
return {
|
|
610
|
+
namespace,
|
|
611
|
+
parameters: {
|
|
612
|
+
_page: options._page,
|
|
613
|
+
[`name.${options.locale}`]: options.name,
|
|
614
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
|
|
615
|
+
},
|
|
616
|
+
path: `${searchBase}/item`
|
|
617
|
+
};
|
|
255
618
|
}
|
|
619
|
+
/**
|
|
620
|
+
|
|
621
|
+
* Get an item subclass by ID.
|
|
622
|
+
|
|
623
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
624
|
+
|
|
625
|
+
* @param itemClassId The item class ID.
|
|
626
|
+
|
|
627
|
+
* @param itemSubclassId The item subclass ID.
|
|
628
|
+
|
|
629
|
+
* @returns The item subclass. See {@link ItemSubClassResponse}.
|
|
630
|
+
|
|
631
|
+
*/
|
|
256
632
|
function itemSubClass(namespace, itemClassId, itemSubclassId) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
633
|
+
return {
|
|
634
|
+
namespace,
|
|
635
|
+
path: `${base}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
|
|
636
|
+
};
|
|
261
637
|
}
|
|
262
638
|
|
|
263
|
-
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/media-search/media-search.ts
|
|
641
|
+
/**
|
|
642
|
+
|
|
643
|
+
* Search for media.
|
|
644
|
+
|
|
645
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
646
|
+
|
|
647
|
+
* @param options The search parameters. See {@link MediaSearchParameters}.
|
|
648
|
+
|
|
649
|
+
* @returns The search results. See {@link SearchResponse}.
|
|
650
|
+
|
|
651
|
+
*/
|
|
264
652
|
function mediaSearch(namespace, options) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
|
|
653
|
+
return {
|
|
654
|
+
namespace,
|
|
655
|
+
parameters: {
|
|
656
|
+
_page: options._page,
|
|
657
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
658
|
+
tags: options.tags
|
|
659
|
+
},
|
|
660
|
+
path: `${searchBase}/media`
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
//#endregion
|
|
665
|
+
//#region src/playable-class/playable-class.ts
|
|
666
|
+
/**
|
|
667
|
+
|
|
668
|
+
* Get a playable class by ID.
|
|
669
|
+
|
|
670
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
671
|
+
|
|
672
|
+
* @param playableClassId The playable class ID.
|
|
673
|
+
|
|
674
|
+
* @returns The playable class. See {@link PlayableClassResponse}.
|
|
675
|
+
|
|
676
|
+
*/
|
|
277
677
|
function playableClass(namespace, playableClassId) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
678
|
+
return {
|
|
679
|
+
namespace,
|
|
680
|
+
path: `${base}/playable-class/${playableClassId}`
|
|
681
|
+
};
|
|
282
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
|
|
685
|
+
* Get a playable class index.
|
|
686
|
+
|
|
687
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
688
|
+
|
|
689
|
+
* @returns The playable class index. See {@link PlayableClassIndexResponse}.
|
|
690
|
+
|
|
691
|
+
*/
|
|
283
692
|
function playableClassIndex(namespace) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
693
|
+
return {
|
|
694
|
+
namespace,
|
|
695
|
+
path: `${base}/playable-class/index`
|
|
696
|
+
};
|
|
288
697
|
}
|
|
698
|
+
/**
|
|
699
|
+
|
|
700
|
+
* Get playable class media by ID.
|
|
701
|
+
|
|
702
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
703
|
+
|
|
704
|
+
* @param playableClassId The playable class ID.
|
|
705
|
+
|
|
706
|
+
* @returns The playable class media. See {@link PlayableClassMediaResponse}.
|
|
707
|
+
|
|
708
|
+
*/
|
|
289
709
|
function playableClassMedia(namespace, playableClassId) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
710
|
+
return {
|
|
711
|
+
namespace,
|
|
712
|
+
path: `${mediaBase}/playable-class/${playableClassId}`
|
|
713
|
+
};
|
|
294
714
|
}
|
|
295
715
|
|
|
296
|
-
|
|
716
|
+
//#endregion
|
|
717
|
+
//#region src/playable-race/playable-race.ts
|
|
718
|
+
/**
|
|
719
|
+
|
|
720
|
+
* Get a playable race by ID.
|
|
721
|
+
|
|
722
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
723
|
+
|
|
724
|
+
* @param playableRaceId The playable race ID.
|
|
725
|
+
|
|
726
|
+
* @returns The playable race. See {@link PlayableRaceResponse}.
|
|
727
|
+
|
|
728
|
+
*/
|
|
297
729
|
function playableRace(namespace, playableRaceId) {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
730
|
+
return {
|
|
731
|
+
namespace,
|
|
732
|
+
path: `${base}/playable-race/${playableRaceId}`
|
|
733
|
+
};
|
|
302
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
|
|
737
|
+
* Get a playable race index.
|
|
738
|
+
|
|
739
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
740
|
+
|
|
741
|
+
* @returns The playable race index. See {@link PlayableRaceIndexResponse}.
|
|
742
|
+
|
|
743
|
+
*/
|
|
303
744
|
function playableRaceIndex(namespace) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
745
|
+
return {
|
|
746
|
+
namespace,
|
|
747
|
+
path: `${base}/playable-race/index`
|
|
748
|
+
};
|
|
308
749
|
}
|
|
309
750
|
|
|
310
|
-
|
|
751
|
+
//#endregion
|
|
752
|
+
//#region src/power-type/power-type.ts
|
|
753
|
+
/**
|
|
754
|
+
|
|
755
|
+
* Get a power type by ID.
|
|
756
|
+
|
|
757
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
758
|
+
|
|
759
|
+
* @param powerTypeId The power type ID.
|
|
760
|
+
|
|
761
|
+
* @returns The power type. See {@link PowerTypeResponse}.
|
|
762
|
+
|
|
763
|
+
*/
|
|
311
764
|
function powerType(namespace, powerTypeId) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
765
|
+
return {
|
|
766
|
+
namespace,
|
|
767
|
+
path: `${base}/power-type/${powerTypeId}`
|
|
768
|
+
};
|
|
316
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
|
|
772
|
+
* Get a power type index.
|
|
773
|
+
|
|
774
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
775
|
+
|
|
776
|
+
* @returns The power type index. See {@link PowerTypeIndexResponse}.
|
|
777
|
+
|
|
778
|
+
*/
|
|
317
779
|
function powerTypeIndex(namespace) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
780
|
+
return {
|
|
781
|
+
namespace,
|
|
782
|
+
path: `${base}/power-type/index`
|
|
783
|
+
};
|
|
322
784
|
}
|
|
323
785
|
|
|
324
|
-
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/pvp-season/pvp-season.ts
|
|
788
|
+
/**
|
|
789
|
+
|
|
790
|
+
* Get a PvP leaderboard by PvP season ID and bracket.
|
|
791
|
+
|
|
792
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
793
|
+
|
|
794
|
+
* @param pvpRegionId The PvP region ID.
|
|
795
|
+
|
|
796
|
+
* @param pvpSeasonId The PvP season ID.
|
|
797
|
+
|
|
798
|
+
* @param pvpBracket The PvP bracket.
|
|
799
|
+
|
|
800
|
+
* @returns The PvP leaderboard.
|
|
801
|
+
|
|
802
|
+
*/
|
|
325
803
|
function pvpLeaderboard(namespace, pvpRegionId, pvpSeasonId, pvpBracket) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
804
|
+
return {
|
|
805
|
+
namespace,
|
|
806
|
+
path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`
|
|
807
|
+
};
|
|
330
808
|
}
|
|
809
|
+
/**
|
|
810
|
+
|
|
811
|
+
* Returns an index of PvP leaderboards for a PvP season in a given PvP region.
|
|
812
|
+
|
|
813
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
814
|
+
|
|
815
|
+
* @param pvpRegionId The PvP region ID.
|
|
816
|
+
|
|
817
|
+
* @param pvpSeasonId The PvP season ID.
|
|
818
|
+
|
|
819
|
+
* @returns The PvP leaderboard index.
|
|
820
|
+
|
|
821
|
+
*/
|
|
331
822
|
function pvpLeaderboardIndex(namespace, pvpRegionId, pvpSeasonId) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
823
|
+
return {
|
|
824
|
+
namespace,
|
|
825
|
+
path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`
|
|
826
|
+
};
|
|
336
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
|
|
830
|
+
* Returns a PvP season by region ID and season ID.
|
|
831
|
+
|
|
832
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
833
|
+
|
|
834
|
+
* @param pvpRegionId The PvP region ID.
|
|
835
|
+
|
|
836
|
+
* @param pvpSeasonId The PvP season ID.
|
|
837
|
+
|
|
838
|
+
* @returns The PvP season.
|
|
839
|
+
|
|
840
|
+
*/
|
|
337
841
|
function pvpRegionalSeason(namespace, pvpRegionId, pvpSeasonId) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
842
|
+
return {
|
|
843
|
+
namespace,
|
|
844
|
+
path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`
|
|
845
|
+
};
|
|
342
846
|
}
|
|
847
|
+
/**
|
|
848
|
+
|
|
849
|
+
* Returns an index of PvP Seasons in a PvP region.
|
|
850
|
+
|
|
851
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
852
|
+
|
|
853
|
+
* @param pvpRegionId The PvP region ID.
|
|
854
|
+
|
|
855
|
+
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
856
|
+
|
|
857
|
+
*/
|
|
343
858
|
function pvpRegionalSeasonIndex(namespace, pvpRegionId) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
859
|
+
return {
|
|
860
|
+
namespace,
|
|
861
|
+
path: `${base}/pvp-region/${pvpRegionId}/pvp-season/index`
|
|
862
|
+
};
|
|
348
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
|
|
866
|
+
* Returns an index of PvP Regions.
|
|
867
|
+
|
|
868
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
869
|
+
|
|
870
|
+
* @returns The PvP region index.
|
|
871
|
+
|
|
872
|
+
*/
|
|
349
873
|
function pvpRegionIndex(namespace) {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
874
|
+
return {
|
|
875
|
+
namespace,
|
|
876
|
+
path: `${base}/pvp-region/index`
|
|
877
|
+
};
|
|
354
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
|
|
881
|
+
* Returns an index of PvP rewards for a PvP season in a given PvP region.
|
|
882
|
+
|
|
883
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
884
|
+
|
|
885
|
+
* @param pvpRegionId The PvP region ID.
|
|
886
|
+
|
|
887
|
+
* @param pvpSeasonId The PvP season ID.
|
|
888
|
+
|
|
889
|
+
* @returns The PvP reward index.
|
|
890
|
+
|
|
891
|
+
*/
|
|
355
892
|
function pvpRewardsIndex(namespace, pvpRegionId, pvpSeasonId) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
893
|
+
return {
|
|
894
|
+
namespace,
|
|
895
|
+
path: `${base}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`
|
|
896
|
+
};
|
|
360
897
|
}
|
|
898
|
+
/**
|
|
899
|
+
|
|
900
|
+
* Get a PvP season by ID.
|
|
901
|
+
|
|
902
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
903
|
+
|
|
904
|
+
* @param pvpSeasonId The PvP season ID.
|
|
905
|
+
|
|
906
|
+
* @returns The PvP season. See {@link PvpSeasonResponse}.
|
|
907
|
+
|
|
908
|
+
*/
|
|
361
909
|
function pvpSeason(namespace, pvpSeasonId) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
910
|
+
return {
|
|
911
|
+
namespace,
|
|
912
|
+
path: `${base}/pvp-season/${pvpSeasonId}`
|
|
913
|
+
};
|
|
366
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
|
|
917
|
+
* Get a PvP season index.
|
|
918
|
+
|
|
919
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
920
|
+
|
|
921
|
+
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
922
|
+
|
|
923
|
+
*/
|
|
367
924
|
function pvpSeasonIndex(namespace) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
925
|
+
return {
|
|
926
|
+
namespace,
|
|
927
|
+
path: `${base}/pvp-season/index`
|
|
928
|
+
};
|
|
372
929
|
}
|
|
373
930
|
|
|
374
|
-
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region src/realm/realm.ts
|
|
933
|
+
/**
|
|
934
|
+
|
|
935
|
+
* Get a realm by slug.
|
|
936
|
+
|
|
937
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
938
|
+
|
|
939
|
+
* @param realmSlug The realm slug.
|
|
940
|
+
|
|
941
|
+
* @returns The realm. See {@link RealmResponse}.
|
|
942
|
+
|
|
943
|
+
*/
|
|
375
944
|
function realm(namespace, realmSlug) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
945
|
+
return {
|
|
946
|
+
namespace,
|
|
947
|
+
path: `${base}/realm/${realmSlug}`
|
|
948
|
+
};
|
|
380
949
|
}
|
|
950
|
+
/**
|
|
951
|
+
|
|
952
|
+
* Get a realm index.
|
|
953
|
+
|
|
954
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
955
|
+
|
|
956
|
+
* @returns The realm index. See {@link RealmIndexResponse}.
|
|
957
|
+
|
|
958
|
+
*/
|
|
381
959
|
function realmIndex(namespace) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
960
|
+
return {
|
|
961
|
+
namespace,
|
|
962
|
+
path: `${base}/realm/index`
|
|
963
|
+
};
|
|
386
964
|
}
|
|
965
|
+
/**
|
|
966
|
+
|
|
967
|
+
* Search for realms.
|
|
968
|
+
|
|
969
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
970
|
+
|
|
971
|
+
* @param options The search parameters. See {@link RealmSearchParameters}.
|
|
972
|
+
|
|
973
|
+
* @returns The search results. See {@link SearchResponse}.
|
|
974
|
+
|
|
975
|
+
*/
|
|
387
976
|
function realmSearch(namespace, options) {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
977
|
+
return {
|
|
978
|
+
namespace,
|
|
979
|
+
parameters: {
|
|
980
|
+
_page: options._page,
|
|
981
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
982
|
+
timezone: options.timezone
|
|
983
|
+
},
|
|
984
|
+
path: `${searchBase}/realm`
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
//#endregion
|
|
989
|
+
//#region src/region/region.ts
|
|
990
|
+
/**
|
|
991
|
+
|
|
992
|
+
* Get a region by ID.
|
|
993
|
+
|
|
994
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
995
|
+
|
|
996
|
+
* @param regionId The region ID.
|
|
997
|
+
|
|
998
|
+
* @returns The region. See {@link RegionResponse}.
|
|
999
|
+
|
|
1000
|
+
*/
|
|
400
1001
|
function region(namespace, regionId) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1002
|
+
return {
|
|
1003
|
+
namespace,
|
|
1004
|
+
path: `${base}/region/${regionId}`
|
|
1005
|
+
};
|
|
405
1006
|
}
|
|
1007
|
+
/**
|
|
1008
|
+
|
|
1009
|
+
* Get a region index.
|
|
1010
|
+
|
|
1011
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
1012
|
+
|
|
1013
|
+
* @returns The region index. See {@link RegionIndexResponse}.
|
|
1014
|
+
|
|
1015
|
+
*/
|
|
406
1016
|
function regionIndex(namespace) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
//Power Type
|
|
473
|
-
powerType,
|
|
474
|
-
powerTypeIndex,
|
|
475
|
-
//Pvp Season
|
|
476
|
-
pvpLeaderboard,
|
|
477
|
-
pvpLeaderboardIndex,
|
|
478
|
-
pvpRegionalSeason,
|
|
479
|
-
pvpRegionalSeasonIndex,
|
|
480
|
-
pvpRegionIndex,
|
|
481
|
-
pvpRewardsIndex,
|
|
482
|
-
pvpSeason,
|
|
483
|
-
pvpSeasonIndex,
|
|
484
|
-
//Realm
|
|
485
|
-
realm,
|
|
486
|
-
realmIndex,
|
|
487
|
-
realmSearch,
|
|
488
|
-
//Region
|
|
489
|
-
region,
|
|
490
|
-
regionIndex
|
|
1017
|
+
return {
|
|
1018
|
+
namespace,
|
|
1019
|
+
path: `${base}/region/index`
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region src/index.ts
|
|
1025
|
+
const classicWow = {
|
|
1026
|
+
auctionHouseIndex,
|
|
1027
|
+
auctions,
|
|
1028
|
+
characterAchievementsSummary,
|
|
1029
|
+
characterAchievementStatistics,
|
|
1030
|
+
characterEquipmentSummary,
|
|
1031
|
+
characterHunterPetsSummary,
|
|
1032
|
+
characterMediaSummary,
|
|
1033
|
+
characterProfileStatus,
|
|
1034
|
+
characterProfileSummary,
|
|
1035
|
+
characterSpecializationsSummary,
|
|
1036
|
+
characterStatisticsSummary,
|
|
1037
|
+
connectedRealm,
|
|
1038
|
+
connectedRealmIndex,
|
|
1039
|
+
connectedRealmSearch,
|
|
1040
|
+
creature,
|
|
1041
|
+
creatureDisplayMedia,
|
|
1042
|
+
creatureFamily,
|
|
1043
|
+
creatureFamilyIndex,
|
|
1044
|
+
creatureFamilyMedia,
|
|
1045
|
+
creatureSearch,
|
|
1046
|
+
creatureType,
|
|
1047
|
+
creatureTypeIndex,
|
|
1048
|
+
guild,
|
|
1049
|
+
guildAchievements,
|
|
1050
|
+
guildActivity,
|
|
1051
|
+
guildRoster,
|
|
1052
|
+
guildCrestBorder,
|
|
1053
|
+
guildCrestComponentsIndex,
|
|
1054
|
+
guildCrestEmblem,
|
|
1055
|
+
item,
|
|
1056
|
+
itemClass,
|
|
1057
|
+
itemClassIndex,
|
|
1058
|
+
itemMedia,
|
|
1059
|
+
itemSearch,
|
|
1060
|
+
itemSubClass,
|
|
1061
|
+
mediaSearch,
|
|
1062
|
+
playableClass,
|
|
1063
|
+
playableClassIndex,
|
|
1064
|
+
playableClassMedia,
|
|
1065
|
+
playableRace,
|
|
1066
|
+
playableRaceIndex,
|
|
1067
|
+
powerType,
|
|
1068
|
+
powerTypeIndex,
|
|
1069
|
+
pvpLeaderboard,
|
|
1070
|
+
pvpLeaderboardIndex,
|
|
1071
|
+
pvpRegionalSeason,
|
|
1072
|
+
pvpRegionalSeasonIndex,
|
|
1073
|
+
pvpRegionIndex,
|
|
1074
|
+
pvpRewardsIndex,
|
|
1075
|
+
pvpSeason,
|
|
1076
|
+
pvpSeasonIndex,
|
|
1077
|
+
realm,
|
|
1078
|
+
realmIndex,
|
|
1079
|
+
realmSearch,
|
|
1080
|
+
region,
|
|
1081
|
+
regionIndex
|
|
491
1082
|
};
|
|
492
1083
|
var src_default = classicWow;
|
|
493
1084
|
|
|
1085
|
+
//#endregion
|
|
494
1086
|
export { auctionHouseIndex, auctions, characterAchievementStatistics, characterAchievementsSummary, characterEquipmentSummary, characterHunterPetsSummary, characterMediaSummary, characterProfileStatus, characterProfileSummary, characterSpecializationsSummary, characterStatisticsSummary, classicWow, connectedRealm, connectedRealmIndex, connectedRealmSearch, creature, creatureDisplayMedia, creatureFamily, creatureFamilyIndex, creatureFamilyMedia, creatureSearch, creatureType, creatureTypeIndex, src_default as default, guild, guildAchievements, guildActivity, guildCrestBorder, guildCrestComponentsIndex, guildCrestEmblem, guildRoster, item, itemClass, itemClassIndex, itemMedia, itemSearch, itemSubClass, mediaSearch, playableClass, playableClassIndex, playableClassMedia, playableRace, playableRaceIndex, powerType, powerTypeIndex, pvpLeaderboard, pvpLeaderboardIndex, pvpRegionIndex, pvpRegionalSeason, pvpRegionalSeasonIndex, pvpRewardsIndex, pvpSeason, pvpSeasonIndex, realm, realmIndex, realmSearch, region, regionIndex };
|
|
495
|
-
//# sourceMappingURL=index.js.map
|
|
496
1087
|
//# sourceMappingURL=index.js.map
|