@blizzard-api/sc2 1.0.4 → 1.0.5
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 +217 -189
- package/dist/index.js +249 -105
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { Resource } from
|
|
1
|
+
import { Resource } from "@blizzard-api/core";
|
|
2
2
|
|
|
3
|
+
//#region src/account/account.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Returns the player information for the specified account ID.
|
|
6
|
+
* @param accountId The account ID
|
|
7
|
+
* @returns The player resource. See {@link Resource}.
|
|
8
|
+
*/
|
|
3
9
|
/**
|
|
4
10
|
* Returns the player information for the specified account ID.
|
|
5
11
|
* @param accountId The account ID
|
|
@@ -7,46 +13,52 @@ import { Resource } from '@blizzard-api/core';
|
|
|
7
13
|
*/
|
|
8
14
|
declare function player(accountId: string): Resource<Array<unknown>>;
|
|
9
15
|
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/base.d.ts
|
|
10
18
|
/**
|
|
11
19
|
* Base interface for Blizzard API responses.
|
|
12
20
|
*/
|
|
13
21
|
interface ResponseBase {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
22
|
+
_links: {
|
|
23
|
+
self: {
|
|
24
|
+
href: string;
|
|
18
25
|
};
|
|
26
|
+
};
|
|
19
27
|
}
|
|
20
28
|
type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';
|
|
21
29
|
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/ladder/types.d.ts
|
|
22
32
|
interface GrandmasterLeaderboardResponse {
|
|
23
|
-
|
|
33
|
+
ladderTeams: Array<LadderTeam>;
|
|
24
34
|
}
|
|
25
35
|
interface SeasonResponse {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
endDate: string;
|
|
37
|
+
number: number;
|
|
38
|
+
seasonId: number;
|
|
39
|
+
startDate: string;
|
|
40
|
+
year: number;
|
|
31
41
|
}
|
|
32
42
|
interface LadderTeam {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
joinTimestamp: number;
|
|
44
|
+
losses: number;
|
|
45
|
+
mmr: number;
|
|
46
|
+
points: number;
|
|
47
|
+
previousRank: number;
|
|
48
|
+
teamMembers: Array<TeamMember>;
|
|
49
|
+
wins: number;
|
|
40
50
|
}
|
|
41
51
|
interface TeamMember {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
clanTag?: string;
|
|
53
|
+
displayName: string;
|
|
54
|
+
favoriteRace: 'protoss' | 'random' | 'terran' | 'zerg';
|
|
55
|
+
id: string;
|
|
56
|
+
realm: number;
|
|
57
|
+
region: number;
|
|
48
58
|
}
|
|
49
59
|
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/ladder/ladder.d.ts
|
|
50
62
|
/**
|
|
51
63
|
* Returns the grandmaster leaderboard for the specified region.
|
|
52
64
|
* @param regionId The region ID
|
|
@@ -60,29 +72,33 @@ declare function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<Gra
|
|
|
60
72
|
*/
|
|
61
73
|
declare function season(regionId: StarcraftRegion): Resource<SeasonResponse>;
|
|
62
74
|
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/league/types.d.ts
|
|
63
77
|
interface LeagueDataResponse extends ResponseBase {
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
key: Key;
|
|
79
|
+
tier: Array<Tier>;
|
|
66
80
|
}
|
|
67
81
|
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver';
|
|
68
82
|
type StarcraftLeagueQueue = 'hots-1v1' | 'hots-2v2' | 'hots-3v3' | 'hots-4v4' | 'lotv-1v1' | 'lotv-2v2' | 'lotv-3v3' | 'lotv-4v4' | 'lotv-archon' | 'wol-1v1' | 'wol-2v2' | 'wol-3v3' | 'wol-4v4';
|
|
69
83
|
type StarcraftLeagueTeamType = 'arranged' | 'random';
|
|
70
84
|
interface Division {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
id: number;
|
|
86
|
+
ladder_id: number;
|
|
87
|
+
member_count: number;
|
|
74
88
|
}
|
|
75
89
|
interface Key {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
league_id: number;
|
|
91
|
+
queue_id: number;
|
|
92
|
+
season_id: number;
|
|
93
|
+
team_type: number;
|
|
80
94
|
}
|
|
81
95
|
interface Tier {
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
division: Array<Division>;
|
|
97
|
+
id: number;
|
|
84
98
|
}
|
|
85
99
|
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/league/league.d.ts
|
|
86
102
|
/**
|
|
87
103
|
* Returns the league data for the specified season, queue, team type, and league.
|
|
88
104
|
* @param seasonId The season ID
|
|
@@ -93,131 +109,135 @@ interface Tier {
|
|
|
93
109
|
*/
|
|
94
110
|
declare function getLeagueData(seasonId: string, queueId: StarcraftLeagueQueue, teamType: StarcraftLeagueTeamType, leagueId: StarcraftLeagueId): Resource<LeagueDataResponse>;
|
|
95
111
|
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/legacy/types.d.ts
|
|
96
114
|
interface LegacyAchievementsResponse {
|
|
97
|
-
|
|
98
|
-
|
|
115
|
+
achievements: Array<Achievement$1>;
|
|
116
|
+
categories: Array<Category$1>;
|
|
99
117
|
}
|
|
100
118
|
interface LegacyLaddersResponse {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
119
|
+
currentSeason: Array<unknown>;
|
|
120
|
+
previousSeason: Array<unknown>;
|
|
121
|
+
showcasePlacement: Array<unknown>;
|
|
104
122
|
}
|
|
105
123
|
interface LegacyMatchHistoryResponse {
|
|
106
|
-
|
|
124
|
+
matches: Array<Match>;
|
|
107
125
|
}
|
|
108
126
|
interface LegacyProfileResponse {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
achievements: Achievements;
|
|
128
|
+
campaign: Campaign;
|
|
129
|
+
career: Career;
|
|
130
|
+
clanName: string;
|
|
131
|
+
clanTag: string;
|
|
132
|
+
displayName: string;
|
|
133
|
+
id: string;
|
|
134
|
+
portrait: Icon;
|
|
135
|
+
profilePath: string;
|
|
136
|
+
realm: number;
|
|
137
|
+
rewards: Rewards;
|
|
138
|
+
season: Season;
|
|
139
|
+
swarmLevels: SwarmLevels;
|
|
122
140
|
}
|
|
123
141
|
interface LegacyRewardsResponse {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
animations: Array<Animation>;
|
|
143
|
+
portraits: Array<Animation>;
|
|
144
|
+
protossDecals: Array<Animation>;
|
|
145
|
+
skins: Array<Animation>;
|
|
146
|
+
terranDecals: Array<Animation>;
|
|
147
|
+
zergDecals: Array<Animation>;
|
|
130
148
|
}
|
|
131
149
|
interface Achievement$1 {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
150
|
+
achievementId: string;
|
|
151
|
+
categoryId: string;
|
|
152
|
+
description: string;
|
|
153
|
+
icon: Icon;
|
|
154
|
+
points: number;
|
|
155
|
+
title: string;
|
|
138
156
|
}
|
|
139
157
|
interface Achievements {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
158
|
+
achievements: Array<{
|
|
159
|
+
achievementId: string;
|
|
160
|
+
completionDate: number;
|
|
161
|
+
}>;
|
|
162
|
+
points: Points;
|
|
145
163
|
}
|
|
146
164
|
interface Animation {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
165
|
+
achievementId: string;
|
|
166
|
+
command?: '/dance';
|
|
167
|
+
icon: Icon;
|
|
168
|
+
id: string;
|
|
169
|
+
name?: string;
|
|
170
|
+
title: string;
|
|
153
171
|
}
|
|
154
172
|
interface Campaign {
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
hots: string;
|
|
174
|
+
wol: string;
|
|
157
175
|
}
|
|
158
176
|
interface Career {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
careerTotalGames: number;
|
|
178
|
+
highest1v1Rank: string;
|
|
179
|
+
highestTeamRank: string;
|
|
180
|
+
primaryRace: string;
|
|
181
|
+
protossWins: number;
|
|
182
|
+
seasonTotalGames: number;
|
|
183
|
+
terranWins: number;
|
|
184
|
+
zergWins: number;
|
|
167
185
|
}
|
|
168
186
|
interface Category$1 {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
187
|
+
categoryId: string;
|
|
188
|
+
children?: Array<Category$1>;
|
|
189
|
+
featuredAchievementId: string;
|
|
190
|
+
title: string;
|
|
173
191
|
}
|
|
174
192
|
interface Icon {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
h: number;
|
|
194
|
+
offset: number;
|
|
195
|
+
url: string;
|
|
196
|
+
w: number;
|
|
197
|
+
x: number;
|
|
198
|
+
y: number;
|
|
181
199
|
}
|
|
182
200
|
interface Match {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
201
|
+
date: number;
|
|
202
|
+
decision: 'Left' | 'Loss' | 'Win';
|
|
203
|
+
map: string;
|
|
204
|
+
speed: 'Fast' | 'Faster';
|
|
205
|
+
type: '2v2' | '3v3' | 'Co-Op' | 'Custom';
|
|
188
206
|
}
|
|
189
207
|
interface Points {
|
|
190
|
-
|
|
191
|
-
|
|
208
|
+
categoryPoints: Record<string, number>;
|
|
209
|
+
totalPoints: number;
|
|
192
210
|
}
|
|
193
211
|
interface Rewards {
|
|
194
|
-
|
|
195
|
-
|
|
212
|
+
earned: Array<string>;
|
|
213
|
+
selected: Array<string>;
|
|
196
214
|
}
|
|
197
215
|
interface Season {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
216
|
+
seasonId: number;
|
|
217
|
+
seasonNumber: number;
|
|
218
|
+
seasonYear: number;
|
|
219
|
+
stats: Array<Stat>;
|
|
220
|
+
totalGamesThisSeason: number;
|
|
203
221
|
}
|
|
204
222
|
interface Stat {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
223
|
+
games: number;
|
|
224
|
+
type: string;
|
|
225
|
+
wins: number;
|
|
208
226
|
}
|
|
209
227
|
interface SwarmLevels {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
228
|
+
level: number;
|
|
229
|
+
protoss: SwarmLevelsByRace;
|
|
230
|
+
terran: SwarmLevelsByRace;
|
|
231
|
+
zerg: SwarmLevelsByRace;
|
|
214
232
|
}
|
|
215
233
|
interface SwarmLevelsByRace {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
234
|
+
currentLevelXP: number;
|
|
235
|
+
level: number;
|
|
236
|
+
totalLevelXP: number;
|
|
219
237
|
}
|
|
220
238
|
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/legacy/legacy.d.ts
|
|
221
241
|
/**
|
|
222
242
|
* Returns the legacy achievements for the specified region.
|
|
223
243
|
* @param regionId The region ID for Starcraft.
|
|
@@ -262,75 +282,79 @@ declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profil
|
|
|
262
282
|
*/
|
|
263
283
|
declare function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse>;
|
|
264
284
|
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/profile/types.d.ts
|
|
265
287
|
interface LadderResponse {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
288
|
+
allLadderMemberships: Array<unknown>;
|
|
289
|
+
ladderTeams: Array<unknown>;
|
|
290
|
+
ranksAndPools: Array<unknown>;
|
|
269
291
|
}
|
|
270
292
|
interface LadderSummaryResponse {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
293
|
+
allLadderMemberships: Array<unknown>;
|
|
294
|
+
placementMatches: Array<unknown>;
|
|
295
|
+
showCaseEntries: Array<unknown>;
|
|
274
296
|
}
|
|
275
297
|
interface MetadataResponse {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
298
|
+
avatarUrl: string;
|
|
299
|
+
name: string;
|
|
300
|
+
profileId: string;
|
|
301
|
+
profileUrl: string;
|
|
302
|
+
realmId: number;
|
|
303
|
+
regionId: number;
|
|
282
304
|
}
|
|
283
305
|
interface StaticProfileResponse {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
306
|
+
achievements: Array<Achievement>;
|
|
307
|
+
categories: Array<Category>;
|
|
308
|
+
criteria: Array<Criterion>;
|
|
309
|
+
rewards: Array<Reward>;
|
|
288
310
|
}
|
|
289
311
|
interface Achievement {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
312
|
+
categoryId: string;
|
|
313
|
+
chainAchievementIds: Array<string>;
|
|
314
|
+
chainRewardSize: number;
|
|
315
|
+
criteriaIds?: Array<string>;
|
|
316
|
+
description: string;
|
|
317
|
+
flags: number;
|
|
318
|
+
id: string;
|
|
319
|
+
imageUrl: string;
|
|
320
|
+
isChained: boolean;
|
|
321
|
+
points: number;
|
|
322
|
+
title: string;
|
|
323
|
+
uiOrderHint: number;
|
|
302
324
|
}
|
|
303
325
|
interface Category {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
326
|
+
childrenCategoryIds: Array<string>;
|
|
327
|
+
featuredAchievementId: string;
|
|
328
|
+
id: string;
|
|
329
|
+
medalTiers?: Array<number>;
|
|
330
|
+
name: string;
|
|
331
|
+
parentCategoryId: null | string;
|
|
332
|
+
points: number;
|
|
333
|
+
uiOrderHint: number;
|
|
312
334
|
}
|
|
313
335
|
interface Criterion {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
336
|
+
achievementId: string;
|
|
337
|
+
description: string;
|
|
338
|
+
evaluationClass: 'Achv' | 'Clnt' | 'S2Gm' | 'Sunk' | 'Trny';
|
|
339
|
+
flags: number;
|
|
340
|
+
id: string;
|
|
341
|
+
necessaryQuantity: number;
|
|
342
|
+
uiOrderHint: number;
|
|
321
343
|
}
|
|
322
344
|
interface Reward {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
345
|
+
achievementId?: string;
|
|
346
|
+
command?: '/dance';
|
|
347
|
+
flags: number;
|
|
348
|
+
id: string;
|
|
349
|
+
imageUrl: string;
|
|
350
|
+
isSkin: boolean;
|
|
351
|
+
name: string;
|
|
352
|
+
uiOrderHint: number;
|
|
353
|
+
unlockableType: string;
|
|
332
354
|
}
|
|
333
355
|
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/profile/profile.d.ts
|
|
334
358
|
/**
|
|
335
359
|
* Returns the ladder information for the specified profile and ladder.
|
|
336
360
|
* @param regionId The region ID for Starcraft.
|
|
@@ -371,22 +395,26 @@ declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: n
|
|
|
371
395
|
*/
|
|
372
396
|
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>;
|
|
373
397
|
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/index.d.ts
|
|
374
400
|
declare const sc2: {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
401
|
+
player: typeof player;
|
|
402
|
+
grandmasterLeaderboard: typeof grandmasterLeaderboard;
|
|
403
|
+
season: typeof season;
|
|
404
|
+
getLeagueData: typeof getLeagueData;
|
|
405
|
+
legacyAchievements: typeof legacyAchievements;
|
|
406
|
+
legacyLadder: typeof legacyLadder;
|
|
407
|
+
legacyLadders: typeof legacyLadders;
|
|
408
|
+
legacyMatchHistory: typeof legacyMatchHistory;
|
|
409
|
+
legacyProfile: typeof legacyProfile;
|
|
410
|
+
legacyRewards: typeof legacyRewards;
|
|
411
|
+
ladder: typeof ladder;
|
|
412
|
+
ladderSummary: typeof ladderSummary;
|
|
413
|
+
metadata: typeof metadata;
|
|
414
|
+
profile: typeof profile;
|
|
415
|
+
staticProfile: typeof staticProfile;
|
|
390
416
|
};
|
|
391
417
|
|
|
392
|
-
|
|
418
|
+
//#endregion
|
|
419
|
+
export { GrandmasterLeaderboardResponse, LadderResponse, LadderSummaryResponse, LeagueDataResponse, LegacyAchievementsResponse, LegacyLaddersResponse, LegacyMatchHistoryResponse, LegacyProfileResponse, LegacyRewardsResponse, MetadataResponse, SeasonResponse, StarcraftLeagueId, StarcraftLeagueQueue, StarcraftLeagueTeamType, StaticProfileResponse, sc2 as default, getLeagueData, grandmasterLeaderboard, ladder, ladderSummary, legacyAchievements, legacyLadder, legacyLadders, legacyMatchHistory, legacyProfile, legacyRewards, metadata, player, profile, sc2, season, staticProfile };
|
|
420
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,150 +1,294 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/account/account.ts
|
|
2
|
+
/**
|
|
3
|
+
|
|
4
|
+
* Returns the player information for the specified account ID.
|
|
5
|
+
|
|
6
|
+
* @param accountId The account ID
|
|
7
|
+
|
|
8
|
+
* @returns The player resource. See {@link Resource}.
|
|
9
|
+
|
|
10
|
+
*/
|
|
2
11
|
function player(accountId) {
|
|
3
|
-
|
|
4
|
-
path: `/sc2/player/${accountId}`
|
|
5
|
-
};
|
|
12
|
+
return { path: `/sc2/player/${accountId}` };
|
|
6
13
|
}
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/base.ts
|
|
17
|
+
const starcraftRegion = {
|
|
18
|
+
cn: 5,
|
|
19
|
+
eu: 2,
|
|
20
|
+
kr: 3,
|
|
21
|
+
tw: 3,
|
|
22
|
+
us: 1
|
|
15
23
|
};
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/ladder/ladder.ts
|
|
27
|
+
/**
|
|
28
|
+
|
|
29
|
+
* Returns the grandmaster leaderboard for the specified region.
|
|
30
|
+
|
|
31
|
+
* @param regionId The region ID
|
|
32
|
+
|
|
33
|
+
* @returns The grandmaster leaderboard resource. See {@link GrandmasterLeaderboardResponse}.
|
|
34
|
+
|
|
35
|
+
*/
|
|
18
36
|
function grandmasterLeaderboard(regionId) {
|
|
19
|
-
|
|
20
|
-
path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}`
|
|
21
|
-
};
|
|
37
|
+
return { path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}` };
|
|
22
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
|
|
41
|
+
* Returns the season information for the specified region.
|
|
42
|
+
|
|
43
|
+
* @param regionId The region ID
|
|
44
|
+
|
|
45
|
+
* @returns The season resource. See {@link SeasonResponse}.
|
|
46
|
+
|
|
47
|
+
*/
|
|
23
48
|
function season(regionId) {
|
|
24
|
-
|
|
25
|
-
path: `/sc2/ladder/season/${starcraftRegion[regionId]}`
|
|
26
|
-
};
|
|
49
|
+
return { path: `/sc2/ladder/season/${starcraftRegion[regionId]}` };
|
|
27
50
|
}
|
|
28
51
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/league/league.ts
|
|
54
|
+
const starcraftLeagueQueue = {
|
|
55
|
+
"hots-1v1": 101,
|
|
56
|
+
"hots-2v2": 102,
|
|
57
|
+
"hots-3v3": 103,
|
|
58
|
+
"hots-4v4": 104,
|
|
59
|
+
"lotv-1v1": 201,
|
|
60
|
+
"lotv-2v2": 202,
|
|
61
|
+
"lotv-3v3": 203,
|
|
62
|
+
"lotv-4v4": 204,
|
|
63
|
+
"lotv-archon": 206,
|
|
64
|
+
"wol-1v1": 1,
|
|
65
|
+
"wol-2v2": 2,
|
|
66
|
+
"wol-3v3": 3,
|
|
67
|
+
"wol-4v4": 4
|
|
44
68
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
69
|
+
const starcraftLeagueTeam = {
|
|
70
|
+
arranged: 0,
|
|
71
|
+
random: 1
|
|
48
72
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
const starcraftLeagueId = {
|
|
74
|
+
bronze: 0,
|
|
75
|
+
diamond: 4,
|
|
76
|
+
gold: 2,
|
|
77
|
+
grandmaster: 6,
|
|
78
|
+
master: 5,
|
|
79
|
+
platinum: 3,
|
|
80
|
+
silver: 1
|
|
57
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
|
|
84
|
+
* Returns the league data for the specified season, queue, team type, and league.
|
|
85
|
+
|
|
86
|
+
* @param seasonId The season ID
|
|
87
|
+
|
|
88
|
+
* @param queueId The queue ID
|
|
89
|
+
|
|
90
|
+
* @param teamType The team type
|
|
91
|
+
|
|
92
|
+
* @param leagueId The league ID
|
|
93
|
+
|
|
94
|
+
* @returns The league data resource. See {@link LeagueDataResponse}.
|
|
95
|
+
|
|
96
|
+
*/
|
|
58
97
|
function getLeagueData(seasonId, queueId, teamType, leagueId) {
|
|
59
|
-
|
|
60
|
-
path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}`
|
|
61
|
-
};
|
|
98
|
+
return { path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}` };
|
|
62
99
|
}
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/legacy/legacy.ts
|
|
103
|
+
/**
|
|
104
|
+
|
|
105
|
+
* Returns the legacy achievements for the specified region.
|
|
106
|
+
|
|
107
|
+
* @param regionId The region ID for Starcraft.
|
|
108
|
+
|
|
109
|
+
* @returns A resource representing the legacy achievements. See {@link LegacyAchievementsResponse}
|
|
110
|
+
|
|
111
|
+
*/
|
|
65
112
|
function legacyAchievements(regionId) {
|
|
66
|
-
|
|
67
|
-
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`
|
|
68
|
-
};
|
|
113
|
+
return { path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}` };
|
|
69
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
|
|
117
|
+
* Returns the ladder information for the specified ladder.
|
|
118
|
+
|
|
119
|
+
* @param regionId The region ID for Starcraft.
|
|
120
|
+
|
|
121
|
+
* @param ladderId The ID of the ladder.
|
|
122
|
+
|
|
123
|
+
* @returns A resource representing the ladder. See {@link LadderResponse}
|
|
124
|
+
|
|
125
|
+
*/
|
|
70
126
|
function legacyLadder(regionId, ladderId) {
|
|
71
|
-
|
|
72
|
-
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`
|
|
73
|
-
};
|
|
127
|
+
return { path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}` };
|
|
74
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
|
|
131
|
+
* Returns the ladders for the specified profile.
|
|
132
|
+
|
|
133
|
+
* @param regionId The region ID for Starcraft.
|
|
134
|
+
|
|
135
|
+
* @param realmId 1 or 2
|
|
136
|
+
|
|
137
|
+
* @param profileId The ID of the profile.
|
|
138
|
+
|
|
139
|
+
* @returns A resource representing the ladders for the given profile. See {@link LegacyLaddersResponse}
|
|
140
|
+
|
|
141
|
+
*/
|
|
75
142
|
function legacyLadders(regionId, realmId, profileId) {
|
|
76
|
-
|
|
77
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders`
|
|
78
|
-
};
|
|
143
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders` };
|
|
79
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
|
|
147
|
+
* Returns the match history for the specified profile.
|
|
148
|
+
|
|
149
|
+
* @param regionId The region ID for Starcraft.
|
|
150
|
+
|
|
151
|
+
* @param realmId 1 or 2
|
|
152
|
+
|
|
153
|
+
* @param profileId The ID of the profile.
|
|
154
|
+
|
|
155
|
+
* @returns A resource representing the match history for the given profile. See {@link LegacyMatchHistoryResponse}
|
|
156
|
+
|
|
157
|
+
*/
|
|
80
158
|
function legacyMatchHistory(regionId, realmId, profileId) {
|
|
81
|
-
|
|
82
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`
|
|
83
|
-
};
|
|
159
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches` };
|
|
84
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
|
|
163
|
+
* Returns the profile for the specified profile.
|
|
164
|
+
|
|
165
|
+
* @param regionId The region ID for Starcraft.
|
|
166
|
+
|
|
167
|
+
* @param realmId 1 or 2
|
|
168
|
+
|
|
169
|
+
* @param profileId The ID of the profile.
|
|
170
|
+
|
|
171
|
+
* @returns A resource representing the profile for the given ID. See {@link LegacyProfileResponse}
|
|
172
|
+
|
|
173
|
+
*/
|
|
85
174
|
function legacyProfile(regionId, realmId, profileId) {
|
|
86
|
-
|
|
87
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
88
|
-
};
|
|
175
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
89
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
|
|
179
|
+
* Returns the rewards for the specified region.
|
|
180
|
+
|
|
181
|
+
* @param regionId The region ID for Starcraft.
|
|
182
|
+
|
|
183
|
+
* @returns A resource representing the rewards for the given region. See {@link LegacyRewardsResponse}
|
|
184
|
+
|
|
185
|
+
*/
|
|
90
186
|
function legacyRewards(regionId) {
|
|
91
|
-
|
|
92
|
-
path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}`
|
|
93
|
-
};
|
|
187
|
+
return { path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}` };
|
|
94
188
|
}
|
|
95
189
|
|
|
96
|
-
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/profile/profile.ts
|
|
192
|
+
/**
|
|
193
|
+
|
|
194
|
+
* Returns the ladder information for the specified profile and ladder.
|
|
195
|
+
|
|
196
|
+
* @param regionId The region ID for Starcraft.
|
|
197
|
+
|
|
198
|
+
* @param realmId 1 or 2
|
|
199
|
+
|
|
200
|
+
* @param profileId The ID of the profile.
|
|
201
|
+
|
|
202
|
+
* @param ladderId The ID of the ladder.
|
|
203
|
+
|
|
204
|
+
* @returns A resource representing the ladder. See {@link LadderResponse}
|
|
205
|
+
|
|
206
|
+
*/
|
|
97
207
|
function ladder(regionId, realmId, profileId, ladderId) {
|
|
98
|
-
|
|
99
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`
|
|
100
|
-
};
|
|
208
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}` };
|
|
101
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
|
|
212
|
+
* Returns the ladder summary information for the specified profile.
|
|
213
|
+
|
|
214
|
+
* @param regionId The region ID for Starcraft.
|
|
215
|
+
|
|
216
|
+
* @param realmId 1 or 2
|
|
217
|
+
|
|
218
|
+
* @param profileId The ID of the profile.
|
|
219
|
+
|
|
220
|
+
* @returns A resource representing the ladder summary. See {@link LadderSummaryResponse}
|
|
221
|
+
|
|
222
|
+
*/
|
|
102
223
|
function ladderSummary(regionId, realmId, profileId) {
|
|
103
|
-
|
|
104
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`
|
|
105
|
-
};
|
|
224
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary` };
|
|
106
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
|
|
228
|
+
* Returns the metadata information for the specified profile.
|
|
229
|
+
|
|
230
|
+
* @param regionId The region ID for Starcraft.
|
|
231
|
+
|
|
232
|
+
* @param realmId 1 or 2
|
|
233
|
+
|
|
234
|
+
* @param profileId The ID of the profile.
|
|
235
|
+
|
|
236
|
+
* @returns A resource representing the metadata. See {@link MetadataResponse}
|
|
237
|
+
|
|
238
|
+
*/
|
|
107
239
|
function metadata(regionId, realmId, profileId) {
|
|
108
|
-
|
|
109
|
-
path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
110
|
-
};
|
|
240
|
+
return { path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
111
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
|
|
244
|
+
* Returns the profile information for the specified profile.
|
|
245
|
+
|
|
246
|
+
* @param regionId The region ID for Starcraft.
|
|
247
|
+
|
|
248
|
+
* @param realmId 1 or 2
|
|
249
|
+
|
|
250
|
+
* @param profileId The ID of the profile.
|
|
251
|
+
|
|
252
|
+
* @returns A resource representing the profile. See {@link MetadataResponse}
|
|
253
|
+
|
|
254
|
+
*/
|
|
112
255
|
function profile(regionId, realmId, profileId) {
|
|
113
|
-
|
|
114
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
115
|
-
};
|
|
256
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
116
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
|
|
260
|
+
*
|
|
261
|
+
|
|
262
|
+
* @param regionId The region ID for Starcraft.
|
|
263
|
+
|
|
264
|
+
* @returns A resource representing the static profile. See {@link StaticProfileResponse}
|
|
265
|
+
|
|
266
|
+
*/
|
|
117
267
|
function staticProfile(regionId) {
|
|
118
|
-
|
|
119
|
-
path: `/sc2/static/profile/${starcraftRegion[regionId]}`
|
|
120
|
-
};
|
|
268
|
+
return { path: `/sc2/static/profile/${starcraftRegion[regionId]}` };
|
|
121
269
|
}
|
|
122
270
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
ladderSummary,
|
|
142
|
-
metadata,
|
|
143
|
-
profile,
|
|
144
|
-
staticProfile
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/index.ts
|
|
273
|
+
const sc2 = {
|
|
274
|
+
player,
|
|
275
|
+
grandmasterLeaderboard,
|
|
276
|
+
season,
|
|
277
|
+
getLeagueData,
|
|
278
|
+
legacyAchievements,
|
|
279
|
+
legacyLadder,
|
|
280
|
+
legacyLadders,
|
|
281
|
+
legacyMatchHistory,
|
|
282
|
+
legacyProfile,
|
|
283
|
+
legacyRewards,
|
|
284
|
+
ladder,
|
|
285
|
+
ladderSummary,
|
|
286
|
+
metadata,
|
|
287
|
+
profile,
|
|
288
|
+
staticProfile
|
|
145
289
|
};
|
|
146
290
|
var src_default = sc2;
|
|
147
291
|
|
|
292
|
+
//#endregion
|
|
148
293
|
export { src_default as default, getLeagueData, grandmasterLeaderboard, ladder, ladderSummary, legacyAchievements, legacyLadder, legacyLadders, legacyMatchHistory, legacyProfile, legacyRewards, metadata, player, profile, sc2, season, staticProfile };
|
|
149
|
-
//# sourceMappingURL=index.js.map
|
|
150
294
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account/account.ts","../src/base.ts","../src/ladder/ladder.ts","../src/league/league.ts","../src/legacy/legacy.ts","../src/profile/profile.ts","../src/index.ts"],"names":[],"mappings":";AAOO,SAAS,OAAO,SAA6C,EAAA;AAClE,EAAO,OAAA;AAAA,IACL,IAAA,EAAM,eAAe,SAAS,CAAA;AAAA,GAChC;AACF;;;ACGO,IAAM,eAAmD,GAAA;AAAA,EAC9D,EAAI,EAAA,CAAA;AAAA,EACJ,EAAI,EAAA,CAAA;AAAA,EACJ,EAAI,EAAA,CAAA;AAAA,EACJ,EAAI,EAAA,CAAA;AAAA,EACJ,EAAI,EAAA;AAC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,GAAA","file":"index.js","sourcesContent":["import type { Resource } from '@blizzard-api/core';\r\n\r\n/**\r\n * Returns the player information for the specified account ID.\r\n * @param accountId The account ID\r\n * @returns The player resource. See {@link Resource}.\r\n */\r\nexport function player(accountId: string): Resource<Array<unknown>> {\r\n return {\r\n path: `/sc2/player/${accountId}`,\r\n };\r\n}\r\n","/**\r\n * Base interface for Blizzard API responses.\r\n */\r\nexport interface ResponseBase {\r\n _links: {\r\n self: {\r\n href: string;\r\n };\r\n };\r\n}\r\n\r\n//The region (1=US, 2=EU, 3=KO and TW, 5=CN).\r\nexport type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';\r\n\r\nexport const starcraftRegion: Record<StarcraftRegion, number> = {\r\n cn: 5,\r\n eu: 2,\r\n kr: 3,\r\n tw: 3,\r\n us: 1,\r\n};\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type { GrandmasterLeaderboardResponse, SeasonResponse } from './types';\r\n\r\n/**\r\n * Returns the grandmaster leaderboard for the specified region.\r\n * @param regionId The region ID\r\n * @returns The grandmaster leaderboard resource. See {@link GrandmasterLeaderboardResponse}.\r\n */\r\nexport function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<GrandmasterLeaderboardResponse> {\r\n return {\r\n path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the season information for the specified region.\r\n * @param regionId The region ID\r\n * @returns The season resource. See {@link SeasonResponse}.\r\n */\r\nexport function season(regionId: StarcraftRegion): Resource<SeasonResponse> {\r\n return {\r\n path: `/sc2/ladder/season/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport type { LeagueDataResponse, StarcraftLeagueId, StarcraftLeagueQueue, StarcraftLeagueTeamType } from './types';\r\n\r\nconst starcraftLeagueQueue: Record<StarcraftLeagueQueue, number> = {\r\n 'hots-1v1': 101,\r\n 'hots-2v2': 102,\r\n 'hots-3v3': 103,\r\n 'hots-4v4': 104,\r\n 'lotv-1v1': 201,\r\n 'lotv-2v2': 202,\r\n 'lotv-3v3': 203,\r\n 'lotv-4v4': 204,\r\n 'lotv-archon': 206,\r\n 'wol-1v1': 1,\r\n 'wol-2v2': 2,\r\n 'wol-3v3': 3,\r\n 'wol-4v4': 4,\r\n};\r\n\r\nconst starcraftLeagueTeam: Record<StarcraftLeagueTeamType, number> = {\r\n arranged: 0,\r\n random: 1,\r\n};\r\n\r\nconst starcraftLeagueId: Record<StarcraftLeagueId, number> = {\r\n bronze: 0,\r\n diamond: 4,\r\n gold: 2,\r\n grandmaster: 6,\r\n master: 5,\r\n platinum: 3,\r\n silver: 1,\r\n};\r\n\r\n/**\r\n * Returns the league data for the specified season, queue, team type, and league.\r\n * @param seasonId The season ID\r\n * @param queueId The queue ID\r\n * @param teamType The team type\r\n * @param leagueId The league ID\r\n * @returns The league data resource. See {@link LeagueDataResponse}.\r\n */\r\nexport function getLeagueData(\r\n seasonId: string,\r\n queueId: StarcraftLeagueQueue,\r\n teamType: StarcraftLeagueTeamType,\r\n leagueId: StarcraftLeagueId,\r\n): Resource<LeagueDataResponse> {\r\n return {\r\n path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type {\r\n LegacyAchievementsResponse,\r\n LegacyLaddersResponse,\r\n LegacyMatchHistoryResponse,\r\n LegacyProfileResponse,\r\n LegacyRewardsResponse,\r\n} from './types';\r\n\r\n/**\r\n * Returns the legacy achievements for the specified region.\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the legacy achievements. See {@link LegacyAchievementsResponse}\r\n */\r\nexport function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse> {\r\n return {\r\n path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladder information for the specified ladder.\r\n * @param regionId The region ID for Starcraft.\r\n * @param ladderId The ID of the ladder.\r\n * @returns A resource representing the ladder. See {@link LadderResponse}\r\n */\r\nexport function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown> {\r\n return {\r\n path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladders for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the ladders for the given profile. See {@link LegacyLaddersResponse}\r\n */\r\nexport function legacyLadders(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyLaddersResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the match history for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the match history for the given profile. See {@link LegacyMatchHistoryResponse}\r\n */\r\nexport function legacyMatchHistory(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyMatchHistoryResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the profile for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the profile for the given ID. See {@link LegacyProfileResponse}\r\n */\r\nexport function legacyProfile(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyProfileResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the rewards for the specified region.\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the rewards for the given region. See {@link LegacyRewardsResponse}\r\n */\r\nexport function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse> {\r\n return {\r\n path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type { LadderResponse, LadderSummaryResponse, MetadataResponse, StaticProfileResponse } from './types';\r\n\r\n/**\r\n * Returns the ladder information for the specified profile and ladder.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @param ladderId The ID of the ladder.\r\n * @returns A resource representing the ladder. See {@link LadderResponse}\r\n */\r\nexport function ladder(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n ladderId: number,\r\n): Resource<LadderResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladder summary information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the ladder summary. See {@link LadderSummaryResponse}\r\n */\r\nexport function ladderSummary(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LadderSummaryResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the metadata information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the metadata. See {@link MetadataResponse}\r\n */\r\nexport function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse> {\r\n return {\r\n path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the profile information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the profile. See {@link MetadataResponse}\r\n */\r\nexport function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the static profile. See {@link StaticProfileResponse}\r\n */\r\nexport function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse> {\r\n return {\r\n path: `/sc2/static/profile/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import { player } from './account/account';\r\nimport { grandmasterLeaderboard, season } from './ladder/ladder';\r\nimport { getLeagueData } from './league/league';\r\nimport {\r\n legacyAchievements,\r\n legacyLadder,\r\n legacyLadders,\r\n legacyMatchHistory,\r\n legacyProfile,\r\n legacyRewards,\r\n} from './legacy/legacy';\r\nimport { ladder, ladderSummary, metadata, profile, staticProfile } from './profile/profile';\r\n\r\nconst sc2 = {\r\n //Account\r\n player,\r\n //Ladder\r\n grandmasterLeaderboard,\r\n season,\r\n //League\r\n getLeagueData,\r\n //Legacy\r\n legacyAchievements,\r\n legacyLadder,\r\n legacyLadders,\r\n legacyMatchHistory,\r\n legacyProfile,\r\n legacyRewards,\r\n //Profile\r\n ladder,\r\n ladderSummary,\r\n metadata,\r\n profile,\r\n staticProfile,\r\n};\r\nexport default sc2;\r\nexport { sc2 };\r\n\r\n//Account\r\nexport * from './account/account';\r\n//Ladder\r\nexport * from './ladder/ladder';\r\nexport type * from './ladder/types';\r\n//League\r\nexport * from './league/league';\r\nexport type * from './league/types';\r\n//Legacy\r\nexport * from './legacy/legacy';\r\nexport type * from './legacy/types';\r\n//Profile\r\nexport * from './profile/profile';\r\nexport type * from './profile/types';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["accountId: string","starcraftRegion: Record<StarcraftRegion, number>","regionId: StarcraftRegion","starcraftLeagueQueue: Record<StarcraftLeagueQueue, number>","starcraftLeagueTeam: Record<StarcraftLeagueTeamType, number>","starcraftLeagueId: Record<StarcraftLeagueId, number>","seasonId: string","queueId: StarcraftLeagueQueue","teamType: StarcraftLeagueTeamType","leagueId: StarcraftLeagueId","regionId: StarcraftRegion","ladderId: number","realmId: 1 | 2","profileId: number","regionId: StarcraftRegion","realmId: 1 | 2","profileId: number","ladderId: number"],"sources":["../src/account/account.ts","../src/base.ts","../src/ladder/ladder.ts","../src/league/league.ts","../src/legacy/legacy.ts","../src/profile/profile.ts","../src/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\r\n\r\n/**\r\n * Returns the player information for the specified account ID.\r\n * @param accountId The account ID\r\n * @returns The player resource. See {@link Resource}.\r\n */\r\nexport function player(accountId: string): Resource<Array<unknown>> {\r\n return {\r\n path: `/sc2/player/${accountId}`,\r\n };\r\n}\r\n","/**\r\n * Base interface for Blizzard API responses.\r\n */\r\nexport interface ResponseBase {\r\n _links: {\r\n self: {\r\n href: string;\r\n };\r\n };\r\n}\r\n\r\n//The region (1=US, 2=EU, 3=KO and TW, 5=CN).\r\nexport type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';\r\n\r\nexport const starcraftRegion: Record<StarcraftRegion, number> = {\r\n cn: 5,\r\n eu: 2,\r\n kr: 3,\r\n tw: 3,\r\n us: 1,\r\n};\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type { GrandmasterLeaderboardResponse, SeasonResponse } from './types';\r\n\r\n/**\r\n * Returns the grandmaster leaderboard for the specified region.\r\n * @param regionId The region ID\r\n * @returns The grandmaster leaderboard resource. See {@link GrandmasterLeaderboardResponse}.\r\n */\r\nexport function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<GrandmasterLeaderboardResponse> {\r\n return {\r\n path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the season information for the specified region.\r\n * @param regionId The region ID\r\n * @returns The season resource. See {@link SeasonResponse}.\r\n */\r\nexport function season(regionId: StarcraftRegion): Resource<SeasonResponse> {\r\n return {\r\n path: `/sc2/ladder/season/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport type { LeagueDataResponse, StarcraftLeagueId, StarcraftLeagueQueue, StarcraftLeagueTeamType } from './types';\r\n\r\nconst starcraftLeagueQueue: Record<StarcraftLeagueQueue, number> = {\r\n 'hots-1v1': 101,\r\n 'hots-2v2': 102,\r\n 'hots-3v3': 103,\r\n 'hots-4v4': 104,\r\n 'lotv-1v1': 201,\r\n 'lotv-2v2': 202,\r\n 'lotv-3v3': 203,\r\n 'lotv-4v4': 204,\r\n 'lotv-archon': 206,\r\n 'wol-1v1': 1,\r\n 'wol-2v2': 2,\r\n 'wol-3v3': 3,\r\n 'wol-4v4': 4,\r\n};\r\n\r\nconst starcraftLeagueTeam: Record<StarcraftLeagueTeamType, number> = {\r\n arranged: 0,\r\n random: 1,\r\n};\r\n\r\nconst starcraftLeagueId: Record<StarcraftLeagueId, number> = {\r\n bronze: 0,\r\n diamond: 4,\r\n gold: 2,\r\n grandmaster: 6,\r\n master: 5,\r\n platinum: 3,\r\n silver: 1,\r\n};\r\n\r\n/**\r\n * Returns the league data for the specified season, queue, team type, and league.\r\n * @param seasonId The season ID\r\n * @param queueId The queue ID\r\n * @param teamType The team type\r\n * @param leagueId The league ID\r\n * @returns The league data resource. See {@link LeagueDataResponse}.\r\n */\r\nexport function getLeagueData(\r\n seasonId: string,\r\n queueId: StarcraftLeagueQueue,\r\n teamType: StarcraftLeagueTeamType,\r\n leagueId: StarcraftLeagueId,\r\n): Resource<LeagueDataResponse> {\r\n return {\r\n path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type {\r\n LegacyAchievementsResponse,\r\n LegacyLaddersResponse,\r\n LegacyMatchHistoryResponse,\r\n LegacyProfileResponse,\r\n LegacyRewardsResponse,\r\n} from './types';\r\n\r\n/**\r\n * Returns the legacy achievements for the specified region.\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the legacy achievements. See {@link LegacyAchievementsResponse}\r\n */\r\nexport function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse> {\r\n return {\r\n path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladder information for the specified ladder.\r\n * @param regionId The region ID for Starcraft.\r\n * @param ladderId The ID of the ladder.\r\n * @returns A resource representing the ladder. See {@link LadderResponse}\r\n */\r\nexport function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown> {\r\n return {\r\n path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladders for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the ladders for the given profile. See {@link LegacyLaddersResponse}\r\n */\r\nexport function legacyLadders(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyLaddersResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the match history for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the match history for the given profile. See {@link LegacyMatchHistoryResponse}\r\n */\r\nexport function legacyMatchHistory(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyMatchHistoryResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the profile for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the profile for the given ID. See {@link LegacyProfileResponse}\r\n */\r\nexport function legacyProfile(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LegacyProfileResponse> {\r\n return {\r\n path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the rewards for the specified region.\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the rewards for the given region. See {@link LegacyRewardsResponse}\r\n */\r\nexport function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse> {\r\n return {\r\n path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import type { Resource } from '@blizzard-api/core';\r\nimport { starcraftRegion, type StarcraftRegion } from '../base';\r\nimport type { LadderResponse, LadderSummaryResponse, MetadataResponse, StaticProfileResponse } from './types';\r\n\r\n/**\r\n * Returns the ladder information for the specified profile and ladder.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @param ladderId The ID of the ladder.\r\n * @returns A resource representing the ladder. See {@link LadderResponse}\r\n */\r\nexport function ladder(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n ladderId: number,\r\n): Resource<LadderResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the ladder summary information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the ladder summary. See {@link LadderSummaryResponse}\r\n */\r\nexport function ladderSummary(\r\n regionId: StarcraftRegion,\r\n realmId: 1 | 2,\r\n profileId: number,\r\n): Resource<LadderSummaryResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the metadata information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the metadata. See {@link MetadataResponse}\r\n */\r\nexport function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse> {\r\n return {\r\n path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n * Returns the profile information for the specified profile.\r\n * @param regionId The region ID for Starcraft.\r\n * @param realmId 1 or 2\r\n * @param profileId The ID of the profile.\r\n * @returns A resource representing the profile. See {@link MetadataResponse}\r\n */\r\nexport function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse> {\r\n return {\r\n path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`,\r\n };\r\n}\r\n\r\n/**\r\n *\r\n * @param regionId The region ID for Starcraft.\r\n * @returns A resource representing the static profile. See {@link StaticProfileResponse}\r\n */\r\nexport function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse> {\r\n return {\r\n path: `/sc2/static/profile/${starcraftRegion[regionId]}`,\r\n };\r\n}\r\n","import { player } from './account/account';\r\nimport { grandmasterLeaderboard, season } from './ladder/ladder';\r\nimport { getLeagueData } from './league/league';\r\nimport {\r\n legacyAchievements,\r\n legacyLadder,\r\n legacyLadders,\r\n legacyMatchHistory,\r\n legacyProfile,\r\n legacyRewards,\r\n} from './legacy/legacy';\r\nimport { ladder, ladderSummary, metadata, profile, staticProfile } from './profile/profile';\r\n\r\nconst sc2 = {\r\n //Account\r\n player,\r\n //Ladder\r\n grandmasterLeaderboard,\r\n season,\r\n //League\r\n getLeagueData,\r\n //Legacy\r\n legacyAchievements,\r\n legacyLadder,\r\n legacyLadders,\r\n legacyMatchHistory,\r\n legacyProfile,\r\n legacyRewards,\r\n //Profile\r\n ladder,\r\n ladderSummary,\r\n metadata,\r\n profile,\r\n staticProfile,\r\n};\r\nexport default sc2;\r\nexport { sc2 };\r\n\r\n//Account\r\nexport * from './account/account';\r\n//Ladder\r\nexport * from './ladder/ladder';\r\nexport type * from './ladder/types';\r\n//League\r\nexport * from './league/league';\r\nexport type * from './league/types';\r\n//Legacy\r\nexport * from './legacy/legacy';\r\nexport type * from './legacy/types';\r\n//Profile\r\nexport * from './profile/profile';\r\nexport type * from './profile/types';\r\n"],"mappings":";;;;;;;;;;AAOA,SAAgB,OAAOA,WAA6C;AAClE,QAAO,EACL,OAAO,cAAc,UAAU,EAChC;AACF;;;;ACGD,MAAaC,kBAAmD;CAC9D,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACL;;;;;;;;;;;;;ACXD,SAAgB,uBAAuBC,UAAqE;AAC1G,QAAO,EACL,OAAO,0BAA0B,gBAAgB,UAAU,EAC5D;AACF;;;;;;;;;;AAOD,SAAgB,OAAOA,UAAqD;AAC1E,QAAO,EACL,OAAO,qBAAqB,gBAAgB,UAAU,EACvD;AACF;;;;ACrBD,MAAMC,uBAA6D;CACjE,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,eAAe;CACf,WAAW;CACX,WAAW;CACX,WAAW;CACX,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;;;;;AASD,SAAgB,cACdH,UACAC,SACAC,WACiC;AACjC,QAAO,EACL,OAAO,eAAe,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,iBACzE;AACF;;;;;;;;;;;;;;AASD,SAAgB,SAASF,UAA2BC,SAAgBC,WAA+C;AACjH,QAAO,EACL,OAAO,wBAAwB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,EAClF;AACF;;;;;;;;;;;;;;AASD,SAAgB,QAAQF,UAA2BC,SAAgBC,WAA+C;AAChH,QAAO,EACL,OAAO,eAAe,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,EACzE;AACF;;;;;;;;;;AAOD,SAAgB,cAAcF,UAA4D;AACxF,QAAO,EACL,OAAO,sBAAsB,gBAAgB,UAAU,EACxD;AACF;;;;AC9DD,MAAM,MAAM;CAEV;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;AACD;AACD,kBAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blizzard-api/sc2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Putro",
|
|
6
6
|
"description": "A series of helpers to interact with the Starcraft II Blizzard API",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@blizzard-api/core": "2.1.
|
|
35
|
+
"@blizzard-api/core": "2.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@blizzard-api/core": "2.1.
|
|
38
|
+
"@blizzard-api/core": "2.1.1"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "
|
|
42
|
-
"dev": "
|
|
41
|
+
"build": "tsdown",
|
|
42
|
+
"dev": "tsdown --watch",
|
|
43
43
|
"test": "vitest run",
|
|
44
44
|
"test:coverage": "pnpm test -- --coverage",
|
|
45
45
|
"test:watch": "vitest watch"
|