@blizzard-api/classic-wow 2.1.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/dist/index.d.ts +862 -910
- package/dist/index.js +737 -395
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,495 +1,837 @@
|
|
|
1
|
-
|
|
2
|
-
var base = "/data/wow";
|
|
3
|
-
var mediaBase = `${base}/media`;
|
|
4
|
-
var searchBase = `${base}/search`;
|
|
1
|
+
import { wowBasePath, wowCharacterBasePath, wowMediaBasePath, wowSearchBasePath } from "@blizzard-api/core";
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
//#region src/auction-house/auction-house.ts
|
|
4
|
+
/**
|
|
5
|
+
* Returns an index of auction houses for a connected realm.
|
|
6
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
7
|
+
* @param connectedRealmId The ID of the connected realm.
|
|
8
|
+
* @returns The auction house index. See {@link AuctionHouseIndexResponse}.
|
|
9
|
+
*/
|
|
7
10
|
function auctionHouseIndex(namespace, connectedRealmId) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
11
|
+
return {
|
|
12
|
+
namespace,
|
|
13
|
+
path: `${wowBasePath}/connected-realm/${connectedRealmId}/auctions/index`
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns all active auctions for a specific auction house on a connected realm.
|
|
18
|
+
*
|
|
19
|
+
* Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
|
|
20
|
+
*
|
|
21
|
+
* 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.
|
|
22
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
23
|
+
* @param connectedRealmId The ID of the connected realm.
|
|
24
|
+
* @param auctionHouseId The ID of the auction house.
|
|
25
|
+
* @returns The auction house data. See {@link AuctionsResponse}.
|
|
26
|
+
*/
|
|
13
27
|
function auctions(namespace, connectedRealmId, auctionHouseId) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
return {
|
|
29
|
+
namespace,
|
|
30
|
+
path: `${wowBasePath}/connected-realm/${connectedRealmId}/auctions/${auctionHouseId}`
|
|
31
|
+
};
|
|
18
32
|
}
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/character-achievements/character-achievements.ts
|
|
36
|
+
/**
|
|
37
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}. Note: This API is not supported for classic era realms.
|
|
38
|
+
* @param realmSlug The slug of the realm.
|
|
39
|
+
* @param characterName The lowercase name of the character.
|
|
40
|
+
* @returns a summary of the achievements a character has completed.
|
|
41
|
+
*/
|
|
24
42
|
function characterAchievementsSummary(namespace, realmSlug, characterName) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
43
|
+
return {
|
|
44
|
+
namespace,
|
|
45
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}. Note: This API is not supported for classic era realms.
|
|
50
|
+
* @param realmSlug The slug of the realm.
|
|
51
|
+
* @param characterName The lowercase name of the character.
|
|
52
|
+
* @returns a character's statistics as they pertain to achievements.
|
|
53
|
+
*/
|
|
30
54
|
function characterAchievementStatistics(namespace, realmSlug, characterName) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
return {
|
|
56
|
+
namespace,
|
|
57
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/achievements/statistics`
|
|
58
|
+
};
|
|
35
59
|
}
|
|
36
60
|
|
|
37
|
-
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/character-equipment/character-equipment.ts
|
|
63
|
+
/**
|
|
64
|
+
* Returns a summary of the items equipped by a character.
|
|
65
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
66
|
+
* @param realmSlug The realm slug.
|
|
67
|
+
* @param characterName The character name.
|
|
68
|
+
* @returns The character equipment summary.
|
|
69
|
+
*/
|
|
38
70
|
function characterEquipmentSummary(namespace, realmSlug, characterName) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
71
|
+
return {
|
|
72
|
+
namespace,
|
|
73
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/equipment`
|
|
74
|
+
};
|
|
43
75
|
}
|
|
44
76
|
|
|
45
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/character-hunter-pets/character-hunter-pets.ts
|
|
79
|
+
/**
|
|
80
|
+
* If the character is a hunter, returns a summary of the character's hunter pets. Otherwise, returns an HTTP 404 Not Found error.
|
|
81
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
82
|
+
* @param realmSlug The slug of the realm.
|
|
83
|
+
* @param characterName The lowercase name of the character.
|
|
84
|
+
* @returns a summary of the character's hunter pets.
|
|
85
|
+
*/
|
|
46
86
|
function characterHunterPetsSummary(namespace, realmSlug, characterName) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
87
|
+
return {
|
|
88
|
+
namespace,
|
|
89
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/hunter-pets`
|
|
90
|
+
};
|
|
51
91
|
}
|
|
52
92
|
|
|
53
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/character-media/character-media.ts
|
|
95
|
+
/**
|
|
96
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
97
|
+
* @param realmSlug The slug of the realm.
|
|
98
|
+
* @param characterName The lowercase name of the character.
|
|
99
|
+
* @returns a summary of the media assets available for a character (such as an avatar render).
|
|
100
|
+
*/
|
|
54
101
|
function characterMediaSummary(namespace, realmSlug, characterName) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
102
|
+
return {
|
|
103
|
+
namespace,
|
|
104
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/character-media`
|
|
105
|
+
};
|
|
59
106
|
}
|
|
60
107
|
|
|
61
|
-
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/character-profile/character-profile.ts
|
|
110
|
+
/**
|
|
111
|
+
* 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:
|
|
112
|
+
* - an HTTP 404 Not Found error is returned
|
|
113
|
+
* - the is_valid value is false
|
|
114
|
+
* - the returned character ID doesn't match the previously recorded value for the character
|
|
115
|
+
*
|
|
116
|
+
* The following example illustrates how to use this endpoint:
|
|
117
|
+
*
|
|
118
|
+
* 1. A client requests and stores information about a character, including its unique character ID and the timestamp of the request.
|
|
119
|
+
* 2. After 30 days, the client makes a request to the status endpoint to verify if the character information is still valid.
|
|
120
|
+
* 3. If character cannot be found, is not valid, or the characters IDs do not match, the client removes the information from their application.
|
|
121
|
+
* 4. If the character is valid and the character IDs match, the client retains the data for another 30 days.
|
|
122
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
123
|
+
* @param realmSlug The slug of the realm.
|
|
124
|
+
* @param characterName The lowercase name of the character.
|
|
125
|
+
* @returns the status of the character profile for a character.
|
|
126
|
+
*/
|
|
62
127
|
function characterProfileStatus(namespace, realmSlug, characterName) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
128
|
+
return {
|
|
129
|
+
namespace,
|
|
130
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}/status`
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Returns a summary of the character profile for a character.
|
|
135
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
136
|
+
* @param realmSlug The slug of the realm.
|
|
137
|
+
* @param characterName The lowercase name of the character.
|
|
138
|
+
* @returns a summary of the character profile for a character.
|
|
139
|
+
*/
|
|
68
140
|
function characterProfileSummary(namespace, realmSlug, characterName) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
141
|
+
return {
|
|
142
|
+
namespace,
|
|
143
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName.toLowerCase()}`
|
|
144
|
+
};
|
|
73
145
|
}
|
|
74
146
|
|
|
75
|
-
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/character-specialization/character-specialization.ts
|
|
149
|
+
/**
|
|
150
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
151
|
+
* @param realmSlug The slug of the realm.
|
|
152
|
+
* @param characterName The lowercase name of the character.
|
|
153
|
+
* @returns a summary of a character's specializations.
|
|
154
|
+
*/
|
|
76
155
|
function characterSpecializationsSummary(namespace, realmSlug, characterName) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
156
|
+
return {
|
|
157
|
+
namespace,
|
|
158
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/specializations`
|
|
159
|
+
};
|
|
81
160
|
}
|
|
82
161
|
|
|
83
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/character-statistics/character-statistics.ts
|
|
164
|
+
/**
|
|
165
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
166
|
+
* @param realmSlug The slug of the realm.
|
|
167
|
+
* @param characterName The lowercase name of the character.
|
|
168
|
+
* @returns a statistics summary for a character.
|
|
169
|
+
*/
|
|
84
170
|
function characterStatisticsSummary(namespace, realmSlug, characterName) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
171
|
+
return {
|
|
172
|
+
namespace,
|
|
173
|
+
path: `${wowCharacterBasePath}/${realmSlug}/${characterName}/statistics`
|
|
174
|
+
};
|
|
89
175
|
}
|
|
90
176
|
|
|
91
|
-
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/connected-realm/connected-realm.ts
|
|
179
|
+
/**
|
|
180
|
+
* Returns a connected realm by ID.
|
|
181
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
182
|
+
* @param connectedRealmId The connected realm ID.
|
|
183
|
+
* @returns The connected realm. See {@link ConnectedRealmResponse}.
|
|
184
|
+
*/
|
|
92
185
|
function connectedRealm(namespace, connectedRealmId) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
186
|
+
return {
|
|
187
|
+
namespace,
|
|
188
|
+
path: `${wowBasePath}/connected-realm/${connectedRealmId}`
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Returns an index of connected realms.
|
|
193
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
194
|
+
* @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.
|
|
195
|
+
*/
|
|
98
196
|
function connectedRealmIndex(namespace) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
197
|
+
return {
|
|
198
|
+
namespace,
|
|
199
|
+
path: `${wowBasePath}/connected-realm/index`
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Performs a search of connected realms.
|
|
204
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
205
|
+
* @param options The search parameters. See {@link ConnectedRealmSearchParameters}.
|
|
206
|
+
* @returns The search results. See {@link ConnectedRealmSearchResponse}.
|
|
207
|
+
*/
|
|
104
208
|
function connectedRealmSearch(namespace, options) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
209
|
+
return {
|
|
210
|
+
namespace,
|
|
211
|
+
parameters: {
|
|
212
|
+
_page: options._page,
|
|
213
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
214
|
+
"realms.timezone": options["realms.timezone"],
|
|
215
|
+
"status.type": options["status.type"]
|
|
216
|
+
},
|
|
217
|
+
path: `${wowBasePath}/search/connected-realm`
|
|
218
|
+
};
|
|
115
219
|
}
|
|
116
220
|
|
|
117
|
-
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/creature/creature.ts
|
|
223
|
+
/**
|
|
224
|
+
* Returns a creature by ID.
|
|
225
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
226
|
+
* @param creatureId The creature ID.
|
|
227
|
+
* @returns The creature. See {@link CreatureResponse}.
|
|
228
|
+
*/
|
|
118
229
|
function creature(namespace, creatureId) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
230
|
+
return {
|
|
231
|
+
namespace,
|
|
232
|
+
path: `${wowBasePath}/creature/${creatureId}`
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Returns media for a creature display by ID.
|
|
237
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
238
|
+
* @param creatureDisplayId The creature display ID.
|
|
239
|
+
* @returns The creature display media. See {@link CreatureDisplayMediaResponse}.
|
|
240
|
+
*/
|
|
124
241
|
function creatureDisplayMedia(namespace, creatureDisplayId) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
242
|
+
return {
|
|
243
|
+
namespace,
|
|
244
|
+
path: `${wowMediaBasePath}/creature-display/${creatureDisplayId}`
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Returns a creature family by ID.
|
|
249
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
250
|
+
* @param creatureFamilyId The creature family ID.
|
|
251
|
+
* @returns The creature family. See {@link CreatureFamilyResponse}.
|
|
252
|
+
*/
|
|
130
253
|
function creatureFamily(namespace, creatureFamilyId) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
254
|
+
return {
|
|
255
|
+
namespace,
|
|
256
|
+
path: `${wowBasePath}/creature-family/${creatureFamilyId}`
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Returns an index of creature families.
|
|
261
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
262
|
+
* @returns The creature family index. See {@link CreatureFamilyIndexResponse}.
|
|
263
|
+
*/
|
|
136
264
|
function creatureFamilyIndex(namespace) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
265
|
+
return {
|
|
266
|
+
namespace,
|
|
267
|
+
path: `${wowBasePath}/creature-family/index`
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Returns media for a creature family by ID.
|
|
272
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
273
|
+
* @param creatureFamilyId The creature family ID.
|
|
274
|
+
* @returns The creature family media. See {@link CreatureFamilyMediaResponse}.
|
|
275
|
+
*/
|
|
142
276
|
function creatureFamilyMedia(namespace, creatureFamilyId) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
277
|
+
return {
|
|
278
|
+
namespace,
|
|
279
|
+
path: `${wowMediaBasePath}/creature-family/${creatureFamilyId}`
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Performs a search of creatures.
|
|
284
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
285
|
+
* @param options The creature search parameters. See {@link CreatureSearchParameters}.
|
|
286
|
+
* @returns The creature search results. See {@link CreatureSearchResponse}.
|
|
287
|
+
*/
|
|
148
288
|
function creatureSearch(namespace, options) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
289
|
+
return {
|
|
290
|
+
namespace,
|
|
291
|
+
parameters: {
|
|
292
|
+
_page: options._page,
|
|
293
|
+
[`name.${options.locale}`]: options.name,
|
|
294
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
|
|
295
|
+
},
|
|
296
|
+
path: `${wowSearchBasePath}/creature`
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Returns a creature type by ID.
|
|
301
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
302
|
+
* @param creatureTypeId The creature type ID.
|
|
303
|
+
* @returns The creature type. See {@link CreatureTypeResponse}.
|
|
304
|
+
*/
|
|
159
305
|
function creatureType(namespace, creatureTypeId) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
306
|
+
return {
|
|
307
|
+
namespace,
|
|
308
|
+
path: `${wowBasePath}/creature-type/${creatureTypeId}`
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Returns an index of creature types.
|
|
313
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
314
|
+
* @returns The creature type index. See {@link CreatureTypeIndexResponse}.
|
|
315
|
+
*/
|
|
165
316
|
function creatureTypeIndex(namespace) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
317
|
+
return {
|
|
318
|
+
namespace,
|
|
319
|
+
path: `${wowBasePath}/creature-type/index`
|
|
320
|
+
};
|
|
170
321
|
}
|
|
171
322
|
|
|
172
|
-
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/guild-crest/guild-crest.ts
|
|
325
|
+
/**
|
|
326
|
+
* Returns media for a guild crest border by ID.
|
|
327
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
328
|
+
* @param borderId The guild crest border ID.
|
|
329
|
+
* @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.
|
|
330
|
+
*/
|
|
173
331
|
function guildCrestBorder(namespace, borderId) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
332
|
+
return {
|
|
333
|
+
namespace,
|
|
334
|
+
path: `${wowMediaBasePath}/guild-crest/border/${borderId}`
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Returns an index of guild crest media.
|
|
339
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
340
|
+
* @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.
|
|
341
|
+
*/
|
|
179
342
|
function guildCrestComponentsIndex(namespace) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
343
|
+
return {
|
|
344
|
+
namespace,
|
|
345
|
+
path: `${wowBasePath}/guild-crest/index`
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Returns media for a guild crest emblem by ID.
|
|
350
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
351
|
+
* @param emblemId The guild crest emblem ID.
|
|
352
|
+
* @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.
|
|
353
|
+
*/
|
|
185
354
|
function guildCrestEmblem(namespace, emblemId) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
355
|
+
return {
|
|
356
|
+
namespace,
|
|
357
|
+
path: `${wowMediaBasePath}/guild-crest/emblem/${emblemId}`
|
|
358
|
+
};
|
|
190
359
|
}
|
|
191
360
|
|
|
192
|
-
|
|
193
|
-
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/guild/guild.ts
|
|
363
|
+
const basePath = "/data/wow/guild";
|
|
364
|
+
/**
|
|
365
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
366
|
+
* @param realmSlug The slug of the realm.
|
|
367
|
+
* @param nameSlug The lowercase name of the guild.
|
|
368
|
+
* @returns a single guild by its name and realm.
|
|
369
|
+
*/
|
|
194
370
|
function guild(namespace, realmSlug, nameSlug) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
371
|
+
return {
|
|
372
|
+
namespace,
|
|
373
|
+
path: `${basePath}/${realmSlug}/${nameSlug}`
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
378
|
+
* @param realmSlug The slug of the realm.
|
|
379
|
+
* @param nameSlug The lowercase name of the guild.
|
|
380
|
+
* @returns a single guild's achievements by name and realm.
|
|
381
|
+
*/
|
|
200
382
|
function guildAchievements(namespace, realmSlug, nameSlug) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
383
|
+
return {
|
|
384
|
+
namespace,
|
|
385
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/achievements`
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
390
|
+
* @param realmSlug The slug of the realm.
|
|
391
|
+
* @param nameSlug The lowercase name of the guild.
|
|
392
|
+
* @returns a single guild's activity by name and realm.
|
|
393
|
+
*/
|
|
206
394
|
function guildActivity(namespace, realmSlug, nameSlug) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
395
|
+
return {
|
|
396
|
+
namespace,
|
|
397
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/activity`
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
402
|
+
* @param realmSlug The slug of the realm.
|
|
403
|
+
* @param nameSlug The lowercase name of the guild.
|
|
404
|
+
* @returns a single guild's roster by its name and realm.
|
|
405
|
+
*/
|
|
212
406
|
function guildRoster(namespace, realmSlug, nameSlug) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
407
|
+
return {
|
|
408
|
+
namespace,
|
|
409
|
+
path: `${basePath}/${realmSlug}/${nameSlug}/roster`
|
|
410
|
+
};
|
|
217
411
|
}
|
|
218
412
|
|
|
219
|
-
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region src/item/item.ts
|
|
415
|
+
/**
|
|
416
|
+
* Get an item by ID.
|
|
417
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
418
|
+
* @param itemId The item ID.
|
|
419
|
+
* @returns The item. See {@link ItemResponse}.
|
|
420
|
+
*/
|
|
220
421
|
function item(namespace, itemId) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
422
|
+
return {
|
|
423
|
+
namespace,
|
|
424
|
+
path: `${wowBasePath}/item/${itemId}`
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Get an item class by ID.
|
|
429
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
430
|
+
* @param itemClassId The item class ID.
|
|
431
|
+
* @returns The item class. See {@link ItemClassResponse}.
|
|
432
|
+
*/
|
|
226
433
|
function itemClass(namespace, itemClassId) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
434
|
+
return {
|
|
435
|
+
namespace,
|
|
436
|
+
path: `${wowBasePath}/item-class/${itemClassId}`
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Get an item class index.
|
|
441
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
442
|
+
* @returns The item class index. See {@link ItemClassIndexResponse}.
|
|
443
|
+
*/
|
|
232
444
|
function itemClassIndex(namespace) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
445
|
+
return {
|
|
446
|
+
namespace,
|
|
447
|
+
path: `${wowBasePath}/item-class/index`
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Get item media by ID.
|
|
452
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
453
|
+
* @param itemId The item ID.
|
|
454
|
+
* @returns The item media. See {@link ItemMediaResponse}.
|
|
455
|
+
*/
|
|
238
456
|
function itemMedia(namespace, itemId) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
457
|
+
return {
|
|
458
|
+
namespace,
|
|
459
|
+
path: `${wowMediaBasePath}/item/${itemId}`
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Search for items.
|
|
464
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
465
|
+
* @param options The search parameters. See {@link ItemSearchParameters}.
|
|
466
|
+
* @returns The search results. See {@link ItemSearchResponse}.
|
|
467
|
+
*/
|
|
244
468
|
function itemSearch(namespace, options) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
469
|
+
return {
|
|
470
|
+
namespace,
|
|
471
|
+
parameters: {
|
|
472
|
+
_page: options._page,
|
|
473
|
+
[`name.${options.locale}`]: options.name,
|
|
474
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby
|
|
475
|
+
},
|
|
476
|
+
path: `${wowSearchBasePath}/item`
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Get an item subclass by ID.
|
|
481
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
482
|
+
* @param itemClassId The item class ID.
|
|
483
|
+
* @param itemSubclassId The item subclass ID.
|
|
484
|
+
* @returns The item subclass. See {@link ItemSubClassResponse}.
|
|
485
|
+
*/
|
|
255
486
|
function itemSubClass(namespace, itemClassId, itemSubclassId) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
487
|
+
return {
|
|
488
|
+
namespace,
|
|
489
|
+
path: `${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
|
|
490
|
+
};
|
|
260
491
|
}
|
|
261
492
|
|
|
262
|
-
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/media-search/media-search.ts
|
|
495
|
+
/**
|
|
496
|
+
* Search for media.
|
|
497
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
498
|
+
* @param options The search parameters. See {@link MediaSearchParameters}.
|
|
499
|
+
* @returns The search results. See {@link MediaSearchResponse}.
|
|
500
|
+
*/
|
|
263
501
|
function mediaSearch(namespace, options) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
502
|
+
return {
|
|
503
|
+
namespace,
|
|
504
|
+
parameters: {
|
|
505
|
+
_page: options._page,
|
|
506
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
507
|
+
tags: options.tags
|
|
508
|
+
},
|
|
509
|
+
path: `${wowSearchBasePath}/media`
|
|
510
|
+
};
|
|
273
511
|
}
|
|
274
512
|
|
|
275
|
-
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/playable-class/playable-class.ts
|
|
515
|
+
/**
|
|
516
|
+
* Get a playable class by ID.
|
|
517
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
518
|
+
* @param playableClassId The playable class ID.
|
|
519
|
+
* @returns The playable class. See {@link PlayableClassResponse}.
|
|
520
|
+
*/
|
|
276
521
|
function playableClass(namespace, playableClassId) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
522
|
+
return {
|
|
523
|
+
namespace,
|
|
524
|
+
path: `${wowBasePath}/playable-class/${playableClassId}`
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Get a playable class index.
|
|
529
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
530
|
+
* @returns The playable class index. See {@link PlayableClassIndexResponse}.
|
|
531
|
+
*/
|
|
282
532
|
function playableClassIndex(namespace) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
533
|
+
return {
|
|
534
|
+
namespace,
|
|
535
|
+
path: `${wowBasePath}/playable-class/index`
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Get playable class media by ID.
|
|
540
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
541
|
+
* @param playableClassId The playable class ID.
|
|
542
|
+
* @returns The playable class media. See {@link PlayableClassMediaResponse}.
|
|
543
|
+
*/
|
|
288
544
|
function playableClassMedia(namespace, playableClassId) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
545
|
+
return {
|
|
546
|
+
namespace,
|
|
547
|
+
path: `${wowMediaBasePath}/playable-class/${playableClassId}`
|
|
548
|
+
};
|
|
293
549
|
}
|
|
294
550
|
|
|
295
|
-
|
|
551
|
+
//#endregion
|
|
552
|
+
//#region src/playable-race/playable-race.ts
|
|
553
|
+
/**
|
|
554
|
+
* Get a playable race by ID.
|
|
555
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
556
|
+
* @param playableRaceId The playable race ID.
|
|
557
|
+
* @returns The playable race. See {@link PlayableRaceResponse}.
|
|
558
|
+
*/
|
|
296
559
|
function playableRace(namespace, playableRaceId) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
560
|
+
return {
|
|
561
|
+
namespace,
|
|
562
|
+
path: `${wowBasePath}/playable-race/${playableRaceId}`
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Get a playable race index.
|
|
567
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
568
|
+
* @returns The playable race index. See {@link PlayableRaceIndexResponse}.
|
|
569
|
+
*/
|
|
302
570
|
function playableRaceIndex(namespace) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
571
|
+
return {
|
|
572
|
+
namespace,
|
|
573
|
+
path: `${wowBasePath}/playable-race/index`
|
|
574
|
+
};
|
|
307
575
|
}
|
|
308
576
|
|
|
309
|
-
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region src/power-type/power-type.ts
|
|
579
|
+
/**
|
|
580
|
+
* Get a power type by ID.
|
|
581
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
582
|
+
* @param powerTypeId The power type ID.
|
|
583
|
+
* @returns The power type. See {@link PowerTypeResponse}.
|
|
584
|
+
*/
|
|
310
585
|
function powerType(namespace, powerTypeId) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
586
|
+
return {
|
|
587
|
+
namespace,
|
|
588
|
+
path: `${wowBasePath}/power-type/${powerTypeId}`
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Get a power type index.
|
|
593
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
594
|
+
* @returns The power type index. See {@link PowerTypeIndexResponse}.
|
|
595
|
+
*/
|
|
316
596
|
function powerTypeIndex(namespace) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
597
|
+
return {
|
|
598
|
+
namespace,
|
|
599
|
+
path: `${wowBasePath}/power-type/index`
|
|
600
|
+
};
|
|
321
601
|
}
|
|
322
602
|
|
|
323
|
-
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region src/pvp-season/pvp-season.ts
|
|
605
|
+
/**
|
|
606
|
+
* Get a PvP leaderboard by PvP season ID and bracket.
|
|
607
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
608
|
+
* @param pvpRegionId The PvP region ID.
|
|
609
|
+
* @param pvpSeasonId The PvP season ID.
|
|
610
|
+
* @param pvpBracket The PvP bracket.
|
|
611
|
+
* @returns The PvP leaderboard.
|
|
612
|
+
*/
|
|
324
613
|
function pvpLeaderboard(namespace, pvpRegionId, pvpSeasonId, pvpBracket) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
614
|
+
return {
|
|
615
|
+
namespace,
|
|
616
|
+
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/${pvpBracket}`
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Returns an index of PvP leaderboards for a PvP season in a given PvP region.
|
|
621
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
622
|
+
* @param pvpRegionId The PvP region ID.
|
|
623
|
+
* @param pvpSeasonId The PvP season ID.
|
|
624
|
+
* @returns The PvP leaderboard index.
|
|
625
|
+
*/
|
|
330
626
|
function pvpLeaderboardIndex(namespace, pvpRegionId, pvpSeasonId) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
627
|
+
return {
|
|
628
|
+
namespace,
|
|
629
|
+
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-leaderboard/index`
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Returns a PvP season by region ID and season ID.
|
|
634
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
635
|
+
* @param pvpRegionId The PvP region ID.
|
|
636
|
+
* @param pvpSeasonId The PvP season ID.
|
|
637
|
+
* @returns The PvP season.
|
|
638
|
+
*/
|
|
336
639
|
function pvpRegionalSeason(namespace, pvpRegionId, pvpSeasonId) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
640
|
+
return {
|
|
641
|
+
namespace,
|
|
642
|
+
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}`
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Returns an index of PvP Seasons in a PvP region.
|
|
647
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
648
|
+
* @param pvpRegionId The PvP region ID.
|
|
649
|
+
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
650
|
+
*/
|
|
342
651
|
function pvpRegionalSeasonIndex(namespace, pvpRegionId) {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
652
|
+
return {
|
|
653
|
+
namespace,
|
|
654
|
+
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/index`
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Returns an index of PvP Regions.
|
|
659
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
660
|
+
* @returns The PvP region index.
|
|
661
|
+
*/
|
|
348
662
|
function pvpRegionIndex(namespace) {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
663
|
+
return {
|
|
664
|
+
namespace,
|
|
665
|
+
path: `${wowBasePath}/pvp-region/index`
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Returns an index of PvP rewards for a PvP season in a given PvP region.
|
|
670
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
671
|
+
* @param pvpRegionId The PvP region ID.
|
|
672
|
+
* @param pvpSeasonId The PvP season ID.
|
|
673
|
+
* @returns The PvP reward index.
|
|
674
|
+
*/
|
|
354
675
|
function pvpRewardsIndex(namespace, pvpRegionId, pvpSeasonId) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
676
|
+
return {
|
|
677
|
+
namespace,
|
|
678
|
+
path: `${wowBasePath}/pvp-region/${pvpRegionId}/pvp-season/${pvpSeasonId}/pvp-reward/index`
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Get a PvP season by ID.
|
|
683
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
684
|
+
* @param pvpSeasonId The PvP season ID.
|
|
685
|
+
* @returns The PvP season. See {@link PvpSeasonResponse}.
|
|
686
|
+
*/
|
|
360
687
|
function pvpSeason(namespace, pvpSeasonId) {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
688
|
+
return {
|
|
689
|
+
namespace,
|
|
690
|
+
path: `${wowBasePath}/pvp-season/${pvpSeasonId}`
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Get a PvP season index.
|
|
695
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
696
|
+
* @returns The PvP season index. See {@link PvpSeasonIndexResponse}.
|
|
697
|
+
*/
|
|
366
698
|
function pvpSeasonIndex(namespace) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
699
|
+
return {
|
|
700
|
+
namespace,
|
|
701
|
+
path: `${wowBasePath}/pvp-season/index`
|
|
702
|
+
};
|
|
371
703
|
}
|
|
372
704
|
|
|
373
|
-
|
|
705
|
+
//#endregion
|
|
706
|
+
//#region src/realm/realm.ts
|
|
707
|
+
/**
|
|
708
|
+
* Get a realm by slug.
|
|
709
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
710
|
+
* @param realmSlug The realm slug.
|
|
711
|
+
* @returns The realm. See {@link RealmResponse}.
|
|
712
|
+
*/
|
|
374
713
|
function realm(namespace, realmSlug) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
714
|
+
return {
|
|
715
|
+
namespace,
|
|
716
|
+
path: `${wowBasePath}/realm/${realmSlug}`
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Get a realm index.
|
|
721
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
722
|
+
* @returns The realm index. See {@link RealmIndexResponse}.
|
|
723
|
+
*/
|
|
380
724
|
function realmIndex(namespace) {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
725
|
+
return {
|
|
726
|
+
namespace,
|
|
727
|
+
path: `${wowBasePath}/realm/index`
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Search for realms.
|
|
732
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
733
|
+
* @param options The search parameters. See {@link RealmSearchParameters}.
|
|
734
|
+
* @returns The search results. See {@link RealmSearchResponse}.
|
|
735
|
+
*/
|
|
386
736
|
function realmSearch(namespace, options) {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
737
|
+
return {
|
|
738
|
+
namespace,
|
|
739
|
+
parameters: {
|
|
740
|
+
_page: options._page,
|
|
741
|
+
orderby: Array.isArray(options.orderby) ? options.orderby.join(",") : options.orderby,
|
|
742
|
+
timezone: options.timezone
|
|
743
|
+
},
|
|
744
|
+
path: `${wowSearchBasePath}/realm`
|
|
745
|
+
};
|
|
396
746
|
}
|
|
397
747
|
|
|
398
|
-
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/region/region.ts
|
|
750
|
+
/**
|
|
751
|
+
* Get a region by ID.
|
|
752
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
753
|
+
* @param regionId The region ID.
|
|
754
|
+
* @returns The region. See {@link RegionResponse}.
|
|
755
|
+
*/
|
|
399
756
|
function region(namespace, regionId) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
757
|
+
return {
|
|
758
|
+
namespace,
|
|
759
|
+
path: `${wowBasePath}/region/${regionId}`
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Get a region index.
|
|
764
|
+
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
|
|
765
|
+
* @returns The region index. See {@link RegionIndexResponse}.
|
|
766
|
+
*/
|
|
405
767
|
function regionIndex(namespace) {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
768
|
+
return {
|
|
769
|
+
namespace,
|
|
770
|
+
path: `${wowBasePath}/region/index`
|
|
771
|
+
};
|
|
410
772
|
}
|
|
411
773
|
|
|
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
|
-
//Power Type
|
|
472
|
-
powerType,
|
|
473
|
-
powerTypeIndex,
|
|
474
|
-
//Pvp Season
|
|
475
|
-
pvpLeaderboard,
|
|
476
|
-
pvpLeaderboardIndex,
|
|
477
|
-
pvpRegionalSeason,
|
|
478
|
-
pvpRegionalSeasonIndex,
|
|
479
|
-
pvpRegionIndex,
|
|
480
|
-
pvpRewardsIndex,
|
|
481
|
-
pvpSeason,
|
|
482
|
-
pvpSeasonIndex,
|
|
483
|
-
//Realm
|
|
484
|
-
realm,
|
|
485
|
-
realmIndex,
|
|
486
|
-
realmSearch,
|
|
487
|
-
//Region
|
|
488
|
-
region,
|
|
489
|
-
regionIndex
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/index.ts
|
|
776
|
+
const classicWow = {
|
|
777
|
+
auctionHouseIndex,
|
|
778
|
+
auctions,
|
|
779
|
+
characterAchievementsSummary,
|
|
780
|
+
characterAchievementStatistics,
|
|
781
|
+
characterEquipmentSummary,
|
|
782
|
+
characterHunterPetsSummary,
|
|
783
|
+
characterMediaSummary,
|
|
784
|
+
characterProfileStatus,
|
|
785
|
+
characterProfileSummary,
|
|
786
|
+
characterSpecializationsSummary,
|
|
787
|
+
characterStatisticsSummary,
|
|
788
|
+
connectedRealm,
|
|
789
|
+
connectedRealmIndex,
|
|
790
|
+
connectedRealmSearch,
|
|
791
|
+
creature,
|
|
792
|
+
creatureDisplayMedia,
|
|
793
|
+
creatureFamily,
|
|
794
|
+
creatureFamilyIndex,
|
|
795
|
+
creatureFamilyMedia,
|
|
796
|
+
creatureSearch,
|
|
797
|
+
creatureType,
|
|
798
|
+
creatureTypeIndex,
|
|
799
|
+
guild,
|
|
800
|
+
guildAchievements,
|
|
801
|
+
guildActivity,
|
|
802
|
+
guildRoster,
|
|
803
|
+
guildCrestBorder,
|
|
804
|
+
guildCrestComponentsIndex,
|
|
805
|
+
guildCrestEmblem,
|
|
806
|
+
item,
|
|
807
|
+
itemClass,
|
|
808
|
+
itemClassIndex,
|
|
809
|
+
itemMedia,
|
|
810
|
+
itemSearch,
|
|
811
|
+
itemSubClass,
|
|
812
|
+
mediaSearch,
|
|
813
|
+
playableClass,
|
|
814
|
+
playableClassIndex,
|
|
815
|
+
playableClassMedia,
|
|
816
|
+
playableRace,
|
|
817
|
+
playableRaceIndex,
|
|
818
|
+
powerType,
|
|
819
|
+
powerTypeIndex,
|
|
820
|
+
pvpLeaderboard,
|
|
821
|
+
pvpLeaderboardIndex,
|
|
822
|
+
pvpRegionalSeason,
|
|
823
|
+
pvpRegionalSeasonIndex,
|
|
824
|
+
pvpRegionIndex,
|
|
825
|
+
pvpRewardsIndex,
|
|
826
|
+
pvpSeason,
|
|
827
|
+
pvpSeasonIndex,
|
|
828
|
+
realm,
|
|
829
|
+
realmIndex,
|
|
830
|
+
realmSearch,
|
|
831
|
+
region,
|
|
832
|
+
regionIndex
|
|
490
833
|
};
|
|
491
|
-
var src_default = classicWow;
|
|
492
834
|
|
|
493
|
-
|
|
494
|
-
|
|
835
|
+
//#endregion
|
|
836
|
+
export { auctionHouseIndex, auctions, characterAchievementStatistics, characterAchievementsSummary, characterEquipmentSummary, characterHunterPetsSummary, characterMediaSummary, characterProfileStatus, characterProfileSummary, characterSpecializationsSummary, characterStatisticsSummary, classicWow, classicWow as default, connectedRealm, connectedRealmIndex, connectedRealmSearch, creature, creatureDisplayMedia, creatureFamily, creatureFamilyIndex, creatureFamilyMedia, creatureSearch, creatureType, creatureTypeIndex, 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
837
|
//# sourceMappingURL=index.js.map
|