@blizzard-api/sc2 1.0.4 → 2.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/dist/index.d.ts +215 -208
- package/dist/index.js +171 -107
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,52 +1,46 @@
|
|
|
1
|
-
import { Resource } from
|
|
1
|
+
import { Resource, ResponseBase } from "@blizzard-api/core";
|
|
2
2
|
|
|
3
|
+
//#region src/account/account.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Returns the player information for the specified account ID.
|
|
5
6
|
* @param accountId The account ID
|
|
6
7
|
* @returns The player resource. See {@link Resource}.
|
|
7
8
|
*/
|
|
8
9
|
declare function player(accountId: string): Resource<Array<unknown>>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Base interface for Blizzard API responses.
|
|
12
|
-
*/
|
|
13
|
-
interface ResponseBase {
|
|
14
|
-
_links: {
|
|
15
|
-
self: {
|
|
16
|
-
href: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/regions.d.ts
|
|
20
12
|
type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';
|
|
21
|
-
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/ladder/types.d.ts
|
|
22
15
|
interface GrandmasterLeaderboardResponse {
|
|
23
|
-
|
|
16
|
+
ladderTeams: Array<LadderTeam>;
|
|
24
17
|
}
|
|
25
18
|
interface SeasonResponse {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
endDate: string;
|
|
20
|
+
number: number;
|
|
21
|
+
seasonId: number;
|
|
22
|
+
startDate: string;
|
|
23
|
+
year: number;
|
|
31
24
|
}
|
|
32
25
|
interface LadderTeam {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
joinTimestamp: number;
|
|
27
|
+
losses: number;
|
|
28
|
+
mmr: number;
|
|
29
|
+
points: number;
|
|
30
|
+
previousRank: number;
|
|
31
|
+
teamMembers: Array<TeamMember>;
|
|
32
|
+
wins: number;
|
|
40
33
|
}
|
|
41
34
|
interface TeamMember {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
35
|
+
clanTag?: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
favoriteRace: 'protoss' | 'random' | 'terran' | 'zerg';
|
|
38
|
+
id: string;
|
|
39
|
+
realm: number;
|
|
40
|
+
region: number;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/ladder/ladder.d.ts
|
|
50
44
|
/**
|
|
51
45
|
* Returns the grandmaster leaderboard for the specified region.
|
|
52
46
|
* @param regionId The region ID
|
|
@@ -59,30 +53,32 @@ declare function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<Gra
|
|
|
59
53
|
* @returns The season resource. See {@link SeasonResponse}.
|
|
60
54
|
*/
|
|
61
55
|
declare function season(regionId: StarcraftRegion): Resource<SeasonResponse>;
|
|
62
|
-
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/league/types.d.ts
|
|
63
58
|
interface LeagueDataResponse extends ResponseBase {
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
key: Key;
|
|
60
|
+
tier: Array<Tier>;
|
|
66
61
|
}
|
|
67
62
|
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver';
|
|
68
63
|
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
64
|
type StarcraftLeagueTeamType = 'arranged' | 'random';
|
|
70
65
|
interface Division {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
id: number;
|
|
67
|
+
ladder_id: number;
|
|
68
|
+
member_count: number;
|
|
74
69
|
}
|
|
75
70
|
interface Key {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
league_id: number;
|
|
72
|
+
queue_id: number;
|
|
73
|
+
season_id: number;
|
|
74
|
+
team_type: number;
|
|
80
75
|
}
|
|
81
76
|
interface Tier {
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
division: Array<Division>;
|
|
78
|
+
id: number;
|
|
84
79
|
}
|
|
85
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/league/league.d.ts
|
|
86
82
|
/**
|
|
87
83
|
* Returns the league data for the specified season, queue, team type, and league.
|
|
88
84
|
* @param seasonId The season ID
|
|
@@ -92,132 +88,139 @@ interface Tier {
|
|
|
92
88
|
* @returns The league data resource. See {@link LeagueDataResponse}.
|
|
93
89
|
*/
|
|
94
90
|
declare function getLeagueData(seasonId: string, queueId: StarcraftLeagueQueue, teamType: StarcraftLeagueTeamType, leagueId: StarcraftLeagueId): Resource<LeagueDataResponse>;
|
|
95
|
-
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/legacy/types.d.ts
|
|
96
93
|
interface LegacyAchievementsResponse {
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
achievements: Array<Achievement$1>;
|
|
95
|
+
categories: Array<Category$1>;
|
|
99
96
|
}
|
|
100
97
|
interface LegacyLaddersResponse {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
currentSeason: Array<unknown>;
|
|
99
|
+
previousSeason: Array<unknown>;
|
|
100
|
+
showcasePlacement: Array<unknown>;
|
|
104
101
|
}
|
|
105
102
|
interface LegacyMatchHistoryResponse {
|
|
106
|
-
|
|
103
|
+
matches: Array<Match>;
|
|
107
104
|
}
|
|
108
105
|
interface LegacyProfileResponse {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
achievements: Achievements;
|
|
107
|
+
campaign: Campaign;
|
|
108
|
+
career: Career;
|
|
109
|
+
clanName: string;
|
|
110
|
+
clanTag: string;
|
|
111
|
+
displayName: string;
|
|
112
|
+
id: string;
|
|
113
|
+
portrait: Icon;
|
|
114
|
+
profilePath: string;
|
|
115
|
+
realm: number;
|
|
116
|
+
rewards: Rewards;
|
|
117
|
+
season: Season;
|
|
118
|
+
swarmLevels: SwarmLevels;
|
|
122
119
|
}
|
|
123
120
|
interface LegacyRewardsResponse {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
animations: Array<Animation>;
|
|
122
|
+
portraits: Array<Animation>;
|
|
123
|
+
protossDecals: Array<Animation>;
|
|
124
|
+
skins: Array<Animation>;
|
|
125
|
+
terranDecals: Array<Animation>;
|
|
126
|
+
zergDecals: Array<Animation>;
|
|
130
127
|
}
|
|
131
128
|
interface Achievement$1 {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
achievementId: string;
|
|
130
|
+
categoryId: string;
|
|
131
|
+
description: string;
|
|
132
|
+
icon: Icon;
|
|
133
|
+
points: number;
|
|
134
|
+
title: string;
|
|
138
135
|
}
|
|
139
136
|
interface Achievements {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
achievements: Array<{
|
|
138
|
+
achievementId: string;
|
|
139
|
+
completionDate: number;
|
|
140
|
+
}>;
|
|
141
|
+
points: Points;
|
|
145
142
|
}
|
|
146
143
|
interface Animation {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
achievementId: string;
|
|
145
|
+
command?: '/dance';
|
|
146
|
+
icon: Icon;
|
|
147
|
+
id: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
title: string;
|
|
153
150
|
}
|
|
154
151
|
interface Campaign {
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
hots: string;
|
|
153
|
+
wol: string;
|
|
157
154
|
}
|
|
158
155
|
interface Career {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
careerTotalGames: number;
|
|
157
|
+
highest1v1Rank: string;
|
|
158
|
+
highestTeamRank: string;
|
|
159
|
+
primaryRace: string;
|
|
160
|
+
protossWins: number;
|
|
161
|
+
seasonTotalGames: number;
|
|
162
|
+
terranWins: number;
|
|
163
|
+
zergWins: number;
|
|
167
164
|
}
|
|
168
165
|
interface Category$1 {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
categoryId: string;
|
|
167
|
+
children?: Array<CategoryChild>;
|
|
168
|
+
featuredAchievementId: string;
|
|
169
|
+
title: string;
|
|
170
|
+
}
|
|
171
|
+
interface CategoryChild {
|
|
172
|
+
categoryId: string;
|
|
173
|
+
featuredAchievementId: string;
|
|
174
|
+
title: string;
|
|
173
175
|
}
|
|
174
176
|
interface Icon {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
h: number;
|
|
178
|
+
offset: number;
|
|
179
|
+
url: string;
|
|
180
|
+
w: number;
|
|
181
|
+
x: number;
|
|
182
|
+
y: number;
|
|
181
183
|
}
|
|
182
184
|
interface Match {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
date: number;
|
|
186
|
+
decision: 'Left' | 'Loss' | 'Win';
|
|
187
|
+
map: string;
|
|
188
|
+
speed: 'Fast' | 'Faster';
|
|
189
|
+
type: '2v2' | '3v3' | 'Co-Op' | 'Custom';
|
|
188
190
|
}
|
|
189
191
|
interface Points {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
categoryPoints: Record<string, number>;
|
|
193
|
+
totalPoints: number;
|
|
192
194
|
}
|
|
193
195
|
interface Rewards {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
earned: Array<string>;
|
|
197
|
+
selected: Array<string>;
|
|
196
198
|
}
|
|
197
199
|
interface Season {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
seasonId: number;
|
|
201
|
+
seasonNumber: number;
|
|
202
|
+
seasonYear: number;
|
|
203
|
+
stats: Array<Stat>;
|
|
204
|
+
totalGamesThisSeason: number;
|
|
203
205
|
}
|
|
204
206
|
interface Stat {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
games: number;
|
|
208
|
+
type: string;
|
|
209
|
+
wins: number;
|
|
208
210
|
}
|
|
209
211
|
interface SwarmLevels {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
level: number;
|
|
213
|
+
protoss: SwarmLevelsByRace;
|
|
214
|
+
terran: SwarmLevelsByRace;
|
|
215
|
+
zerg: SwarmLevelsByRace;
|
|
214
216
|
}
|
|
215
217
|
interface SwarmLevelsByRace {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
currentLevelXP: number;
|
|
219
|
+
level: number;
|
|
220
|
+
totalLevelXP: number;
|
|
219
221
|
}
|
|
220
|
-
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/legacy/legacy.d.ts
|
|
221
224
|
/**
|
|
222
225
|
* Returns the legacy achievements for the specified region.
|
|
223
226
|
* @param regionId The region ID for Starcraft.
|
|
@@ -261,76 +264,78 @@ declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profil
|
|
|
261
264
|
* @returns A resource representing the rewards for the given region. See {@link LegacyRewardsResponse}
|
|
262
265
|
*/
|
|
263
266
|
declare function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse>;
|
|
264
|
-
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/profile/types.d.ts
|
|
265
269
|
interface LadderResponse {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
allLadderMemberships: Array<unknown>;
|
|
271
|
+
ladderTeams: Array<unknown>;
|
|
272
|
+
ranksAndPools: Array<unknown>;
|
|
269
273
|
}
|
|
270
274
|
interface LadderSummaryResponse {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
275
|
+
allLadderMemberships: Array<unknown>;
|
|
276
|
+
placementMatches: Array<unknown>;
|
|
277
|
+
showCaseEntries: Array<unknown>;
|
|
274
278
|
}
|
|
275
279
|
interface MetadataResponse {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
avatarUrl: string;
|
|
281
|
+
name: string;
|
|
282
|
+
profileId: string;
|
|
283
|
+
profileUrl: string;
|
|
284
|
+
realmId: number;
|
|
285
|
+
regionId: number;
|
|
282
286
|
}
|
|
283
287
|
interface StaticProfileResponse {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
achievements: Array<Achievement>;
|
|
289
|
+
categories: Array<Category>;
|
|
290
|
+
criteria: Array<Criterion>;
|
|
291
|
+
rewards: Array<Reward>;
|
|
288
292
|
}
|
|
289
293
|
interface Achievement {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
294
|
+
categoryId: string;
|
|
295
|
+
chainAchievementIds: Array<string>;
|
|
296
|
+
chainRewardSize: number;
|
|
297
|
+
criteriaIds?: Array<string>;
|
|
298
|
+
description: string;
|
|
299
|
+
flags: number;
|
|
300
|
+
id: string;
|
|
301
|
+
imageUrl: string;
|
|
302
|
+
isChained: boolean;
|
|
303
|
+
points: number;
|
|
304
|
+
title: string;
|
|
305
|
+
uiOrderHint: number;
|
|
302
306
|
}
|
|
303
307
|
interface Category {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
childrenCategoryIds: Array<string>;
|
|
309
|
+
featuredAchievementId: string;
|
|
310
|
+
id: string;
|
|
311
|
+
medalTiers?: Array<number>;
|
|
312
|
+
name: string;
|
|
313
|
+
parentCategoryId: null | string;
|
|
314
|
+
points: number;
|
|
315
|
+
uiOrderHint: number;
|
|
312
316
|
}
|
|
313
317
|
interface Criterion {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
achievementId: string;
|
|
319
|
+
description: string;
|
|
320
|
+
evaluationClass: 'Achv' | 'Clnt' | 'S2Gm' | 'Sunk' | 'Trny';
|
|
321
|
+
flags: number;
|
|
322
|
+
id: string;
|
|
323
|
+
necessaryQuantity: number;
|
|
324
|
+
uiOrderHint: number;
|
|
321
325
|
}
|
|
322
326
|
interface Reward {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
|
|
327
|
+
achievementId?: string;
|
|
328
|
+
command?: '/dance';
|
|
329
|
+
flags: number;
|
|
330
|
+
id: string;
|
|
331
|
+
imageUrl: string;
|
|
332
|
+
isSkin: boolean;
|
|
333
|
+
name: string;
|
|
334
|
+
uiOrderHint: number;
|
|
335
|
+
unlockableType: string;
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/profile/profile.d.ts
|
|
334
339
|
/**
|
|
335
340
|
* Returns the ladder information for the specified profile and ladder.
|
|
336
341
|
* @param regionId The region ID for Starcraft.
|
|
@@ -370,23 +375,25 @@ declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: n
|
|
|
370
375
|
* @returns A resource representing the static profile. See {@link StaticProfileResponse}
|
|
371
376
|
*/
|
|
372
377
|
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>;
|
|
373
|
-
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/index.d.ts
|
|
374
380
|
declare const sc2: {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
381
|
+
player: typeof player;
|
|
382
|
+
grandmasterLeaderboard: typeof grandmasterLeaderboard;
|
|
383
|
+
season: typeof season;
|
|
384
|
+
getLeagueData: typeof getLeagueData;
|
|
385
|
+
legacyAchievements: typeof legacyAchievements;
|
|
386
|
+
legacyLadder: typeof legacyLadder;
|
|
387
|
+
legacyLadders: typeof legacyLadders;
|
|
388
|
+
legacyMatchHistory: typeof legacyMatchHistory;
|
|
389
|
+
legacyProfile: typeof legacyProfile;
|
|
390
|
+
legacyRewards: typeof legacyRewards;
|
|
391
|
+
ladder: typeof ladder;
|
|
392
|
+
ladderSummary: typeof ladderSummary;
|
|
393
|
+
metadata: typeof metadata;
|
|
394
|
+
profile: typeof profile;
|
|
395
|
+
staticProfile: typeof staticProfile;
|
|
390
396
|
};
|
|
391
|
-
|
|
392
|
-
export {
|
|
397
|
+
//#endregion
|
|
398
|
+
export { GrandmasterLeaderboardResponse, LadderResponse, LadderSummaryResponse, LeagueDataResponse, LegacyAchievementsResponse, LegacyLaddersResponse, LegacyMatchHistoryResponse, LegacyProfileResponse, LegacyRewardsResponse, MetadataResponse, SeasonResponse, StarcraftLeagueId, StarcraftLeagueQueue, StarcraftLeagueTeamType, StaticProfileResponse, sc2 as default, sc2, getLeagueData, grandmasterLeaderboard, ladder, ladderSummary, legacyAchievements, legacyLadder, legacyLadders, legacyMatchHistory, legacyProfile, legacyRewards, metadata, player, profile, season, staticProfile };
|
|
399
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,150 +1,214 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/account/account.ts
|
|
2
|
+
/**
|
|
3
|
+
* Returns the player information for the specified account ID.
|
|
4
|
+
* @param accountId The account ID
|
|
5
|
+
* @returns The player resource. See {@link Resource}.
|
|
6
|
+
*/
|
|
2
7
|
function player(accountId) {
|
|
3
|
-
|
|
4
|
-
path: `/sc2/player/${accountId}`
|
|
5
|
-
};
|
|
8
|
+
return { path: `/sc2/player/${accountId}` };
|
|
6
9
|
}
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/regions.ts
|
|
13
|
+
const starcraftRegion = {
|
|
14
|
+
cn: 5,
|
|
15
|
+
eu: 2,
|
|
16
|
+
kr: 3,
|
|
17
|
+
tw: 3,
|
|
18
|
+
us: 1
|
|
15
19
|
};
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/ladder/ladder.ts
|
|
23
|
+
/**
|
|
24
|
+
* Returns the grandmaster leaderboard for the specified region.
|
|
25
|
+
* @param regionId The region ID
|
|
26
|
+
* @returns The grandmaster leaderboard resource. See {@link GrandmasterLeaderboardResponse}.
|
|
27
|
+
*/
|
|
18
28
|
function grandmasterLeaderboard(regionId) {
|
|
19
|
-
|
|
20
|
-
path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}`
|
|
21
|
-
};
|
|
29
|
+
return { path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}` };
|
|
22
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns the season information for the specified region.
|
|
33
|
+
* @param regionId The region ID
|
|
34
|
+
* @returns The season resource. See {@link SeasonResponse}.
|
|
35
|
+
*/
|
|
23
36
|
function season(regionId) {
|
|
24
|
-
|
|
25
|
-
path: `/sc2/ladder/season/${starcraftRegion[regionId]}`
|
|
26
|
-
};
|
|
37
|
+
return { path: `/sc2/ladder/season/${starcraftRegion[regionId]}` };
|
|
27
38
|
}
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/league/league.ts
|
|
42
|
+
const starcraftLeagueQueue = {
|
|
43
|
+
"hots-1v1": 101,
|
|
44
|
+
"hots-2v2": 102,
|
|
45
|
+
"hots-3v3": 103,
|
|
46
|
+
"hots-4v4": 104,
|
|
47
|
+
"lotv-1v1": 201,
|
|
48
|
+
"lotv-2v2": 202,
|
|
49
|
+
"lotv-3v3": 203,
|
|
50
|
+
"lotv-4v4": 204,
|
|
51
|
+
"lotv-archon": 206,
|
|
52
|
+
"wol-1v1": 1,
|
|
53
|
+
"wol-2v2": 2,
|
|
54
|
+
"wol-3v3": 3,
|
|
55
|
+
"wol-4v4": 4
|
|
44
56
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
const starcraftLeagueTeam = {
|
|
58
|
+
arranged: 0,
|
|
59
|
+
random: 1
|
|
48
60
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
const starcraftLeagueId = {
|
|
62
|
+
bronze: 0,
|
|
63
|
+
diamond: 4,
|
|
64
|
+
gold: 2,
|
|
65
|
+
grandmaster: 6,
|
|
66
|
+
master: 5,
|
|
67
|
+
platinum: 3,
|
|
68
|
+
silver: 1
|
|
57
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* Returns the league data for the specified season, queue, team type, and league.
|
|
72
|
+
* @param seasonId The season ID
|
|
73
|
+
* @param queueId The queue ID
|
|
74
|
+
* @param teamType The team type
|
|
75
|
+
* @param leagueId The league ID
|
|
76
|
+
* @returns The league data resource. See {@link LeagueDataResponse}.
|
|
77
|
+
*/
|
|
58
78
|
function getLeagueData(seasonId, queueId, teamType, leagueId) {
|
|
59
|
-
|
|
60
|
-
path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}`
|
|
61
|
-
};
|
|
79
|
+
return { path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}` };
|
|
62
80
|
}
|
|
63
81
|
|
|
64
|
-
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/legacy/legacy.ts
|
|
84
|
+
/**
|
|
85
|
+
* Returns the legacy achievements for the specified region.
|
|
86
|
+
* @param regionId The region ID for Starcraft.
|
|
87
|
+
* @returns A resource representing the legacy achievements. See {@link LegacyAchievementsResponse}
|
|
88
|
+
*/
|
|
65
89
|
function legacyAchievements(regionId) {
|
|
66
|
-
|
|
67
|
-
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`
|
|
68
|
-
};
|
|
90
|
+
return { path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}` };
|
|
69
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Returns the ladder information for the specified ladder.
|
|
94
|
+
* @param regionId The region ID for Starcraft.
|
|
95
|
+
* @param ladderId The ID of the ladder.
|
|
96
|
+
* @returns A resource representing the ladder. See {@link LadderResponse}
|
|
97
|
+
*/
|
|
70
98
|
function legacyLadder(regionId, ladderId) {
|
|
71
|
-
|
|
72
|
-
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`
|
|
73
|
-
};
|
|
99
|
+
return { path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}` };
|
|
74
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns the ladders for the specified profile.
|
|
103
|
+
* @param regionId The region ID for Starcraft.
|
|
104
|
+
* @param realmId 1 or 2
|
|
105
|
+
* @param profileId The ID of the profile.
|
|
106
|
+
* @returns A resource representing the ladders for the given profile. See {@link LegacyLaddersResponse}
|
|
107
|
+
*/
|
|
75
108
|
function legacyLadders(regionId, realmId, profileId) {
|
|
76
|
-
|
|
77
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders`
|
|
78
|
-
};
|
|
109
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders` };
|
|
79
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns the match history for the specified profile.
|
|
113
|
+
* @param regionId The region ID for Starcraft.
|
|
114
|
+
* @param realmId 1 or 2
|
|
115
|
+
* @param profileId The ID of the profile.
|
|
116
|
+
* @returns A resource representing the match history for the given profile. See {@link LegacyMatchHistoryResponse}
|
|
117
|
+
*/
|
|
80
118
|
function legacyMatchHistory(regionId, realmId, profileId) {
|
|
81
|
-
|
|
82
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`
|
|
83
|
-
};
|
|
119
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches` };
|
|
84
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Returns the profile for the specified profile.
|
|
123
|
+
* @param regionId The region ID for Starcraft.
|
|
124
|
+
* @param realmId 1 or 2
|
|
125
|
+
* @param profileId The ID of the profile.
|
|
126
|
+
* @returns A resource representing the profile for the given ID. See {@link LegacyProfileResponse}
|
|
127
|
+
*/
|
|
85
128
|
function legacyProfile(regionId, realmId, profileId) {
|
|
86
|
-
|
|
87
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
88
|
-
};
|
|
129
|
+
return { path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
89
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Returns the rewards for the specified region.
|
|
133
|
+
* @param regionId The region ID for Starcraft.
|
|
134
|
+
* @returns A resource representing the rewards for the given region. See {@link LegacyRewardsResponse}
|
|
135
|
+
*/
|
|
90
136
|
function legacyRewards(regionId) {
|
|
91
|
-
|
|
92
|
-
path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}`
|
|
93
|
-
};
|
|
137
|
+
return { path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}` };
|
|
94
138
|
}
|
|
95
139
|
|
|
96
|
-
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/profile/profile.ts
|
|
142
|
+
/**
|
|
143
|
+
* Returns the ladder information for the specified profile and ladder.
|
|
144
|
+
* @param regionId The region ID for Starcraft.
|
|
145
|
+
* @param realmId 1 or 2
|
|
146
|
+
* @param profileId The ID of the profile.
|
|
147
|
+
* @param ladderId The ID of the ladder.
|
|
148
|
+
* @returns A resource representing the ladder. See {@link LadderResponse}
|
|
149
|
+
*/
|
|
97
150
|
function ladder(regionId, realmId, profileId, ladderId) {
|
|
98
|
-
|
|
99
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`
|
|
100
|
-
};
|
|
151
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}` };
|
|
101
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Returns the ladder summary information for the specified profile.
|
|
155
|
+
* @param regionId The region ID for Starcraft.
|
|
156
|
+
* @param realmId 1 or 2
|
|
157
|
+
* @param profileId The ID of the profile.
|
|
158
|
+
* @returns A resource representing the ladder summary. See {@link LadderSummaryResponse}
|
|
159
|
+
*/
|
|
102
160
|
function ladderSummary(regionId, realmId, profileId) {
|
|
103
|
-
|
|
104
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`
|
|
105
|
-
};
|
|
161
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary` };
|
|
106
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns the metadata information for the specified profile.
|
|
165
|
+
* @param regionId The region ID for Starcraft.
|
|
166
|
+
* @param realmId 1 or 2
|
|
167
|
+
* @param profileId The ID of the profile.
|
|
168
|
+
* @returns A resource representing the metadata. See {@link MetadataResponse}
|
|
169
|
+
*/
|
|
107
170
|
function metadata(regionId, realmId, profileId) {
|
|
108
|
-
|
|
109
|
-
path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
110
|
-
};
|
|
171
|
+
return { path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
111
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Returns the profile information for the specified profile.
|
|
175
|
+
* @param regionId The region ID for Starcraft.
|
|
176
|
+
* @param realmId 1 or 2
|
|
177
|
+
* @param profileId The ID of the profile.
|
|
178
|
+
* @returns A resource representing the profile. See {@link MetadataResponse}
|
|
179
|
+
*/
|
|
112
180
|
function profile(regionId, realmId, profileId) {
|
|
113
|
-
|
|
114
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
115
|
-
};
|
|
181
|
+
return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` };
|
|
116
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @param regionId The region ID for Starcraft.
|
|
186
|
+
* @returns A resource representing the static profile. See {@link StaticProfileResponse}
|
|
187
|
+
*/
|
|
117
188
|
function staticProfile(regionId) {
|
|
118
|
-
|
|
119
|
-
path: `/sc2/static/profile/${starcraftRegion[regionId]}`
|
|
120
|
-
};
|
|
189
|
+
return { path: `/sc2/static/profile/${starcraftRegion[regionId]}` };
|
|
121
190
|
}
|
|
122
191
|
|
|
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
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/index.ts
|
|
194
|
+
const sc2 = {
|
|
195
|
+
player,
|
|
196
|
+
grandmasterLeaderboard,
|
|
197
|
+
season,
|
|
198
|
+
getLeagueData,
|
|
199
|
+
legacyAchievements,
|
|
200
|
+
legacyLadder,
|
|
201
|
+
legacyLadders,
|
|
202
|
+
legacyMatchHistory,
|
|
203
|
+
legacyProfile,
|
|
204
|
+
legacyRewards,
|
|
205
|
+
ladder,
|
|
206
|
+
ladderSummary,
|
|
207
|
+
metadata,
|
|
208
|
+
profile,
|
|
209
|
+
staticProfile
|
|
145
210
|
};
|
|
146
|
-
var src_default = sc2;
|
|
147
211
|
|
|
148
|
-
|
|
149
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
export { sc2 as default, sc2, getLeagueData, grandmasterLeaderboard, ladder, ladderSummary, legacyAchievements, legacyLadder, legacyLadders, legacyMatchHistory, legacyProfile, legacyRewards, metadata, player, profile, season, staticProfile };
|
|
150
214
|
//# 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":"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","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":[],"sources":["../src/account/account.ts","../src/regions.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","//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 } from '../regions';\r\nimport type { StarcraftRegion } from '../regions';\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 } from '../regions';\r\nimport type { StarcraftRegion } from '../regions';\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 } from '../regions';\r\nimport type { StarcraftRegion } from '../regions';\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,OAAO,WAA6C;AAClE,QAAO,EACL,MAAM,eAAe,aACtB;;;;;ACPH,MAAa,kBAAmD;CAC9D,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;;;;;;;;;ACCD,SAAgB,uBAAuB,UAAqE;AAC1G,QAAO,EACL,MAAM,2BAA2B,gBAAgB,aAClD;;;;;;;AAQH,SAAgB,OAAO,UAAqD;AAC1E,QAAO,EACL,MAAM,sBAAsB,gBAAgB,aAC7C;;;;;ACrBH,MAAM,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,WAAW;CACZ;AAED,MAAM,sBAA+D;CACnE,UAAU;CACV,QAAQ;CACT;AAED,MAAM,oBAAuD;CAC3D,QAAQ;CACR,SAAS;CACT,MAAM;CACN,aAAa;CACb,QAAQ;CACR,UAAU;CACV,QAAQ;CACT;;;;;;;;;AAUD,SAAgB,cACd,UACA,SACA,UACA,UAC8B;AAC9B,QAAO,EACL,MAAM,oBAAoB,SAAS,GAAG,qBAAqB,SAAS,GAAG,oBAAoB,UAAU,GAAG,kBAAkB,aAC3H;;;;;;;;;;AClCH,SAAgB,mBAAmB,UAAiE;AAClG,QAAO,EACL,MAAM,iCAAiC,gBAAgB,aACxD;;;;;;;;AASH,SAAgB,aAAa,UAA2B,UAAqC;AAC3F,QAAO,EACL,MAAM,sBAAsB,gBAAgB,UAAU,GAAG,YAC1D;;;;;;;;;AAUH,SAAgB,cACd,UACA,SACA,WACiC;AACjC,QAAO,EACL,MAAM,uBAAuB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,WAChF;;;;;;;;;AAUH,SAAgB,mBACd,UACA,SACA,WACsC;AACtC,QAAO,EACL,MAAM,uBAAuB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,WAChF;;;;;;;;;AAUH,SAAgB,cACd,UACA,SACA,WACiC;AACjC,QAAO,EACL,MAAM,uBAAuB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,aACtE;;;;;;;AAQH,SAAgB,cAAc,UAA4D;AACxF,QAAO,EACL,MAAM,4BAA4B,gBAAgB,aACnD;;;;;;;;;;;;;AChFH,SAAgB,OACd,UACA,SACA,WACA,UAC0B;AAC1B,QAAO,EACL,MAAM,gBAAgB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,UAAU,YACnF;;;;;;;;;AAUH,SAAgB,cACd,UACA,SACA,WACiC;AACjC,QAAO,EACL,MAAM,gBAAgB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,UAAU,kBACzE;;;;;;;;;AAUH,SAAgB,SAAS,UAA2B,SAAgB,WAA+C;AACjH,QAAO,EACL,MAAM,yBAAyB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,aACxE;;;;;;;;;AAUH,SAAgB,QAAQ,UAA2B,SAAgB,WAA+C;AAChH,QAAO,EACL,MAAM,gBAAgB,gBAAgB,UAAU,GAAG,QAAQ,GAAG,aAC/D;;;;;;;AAQH,SAAgB,cAAc,UAA4D;AACxF,QAAO,EACL,MAAM,uBAAuB,gBAAgB,aAC9C;;;;;AC9DH,MAAM,MAAM;CAEV;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACD"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blizzard-api/sc2",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Putro",
|
|
6
6
|
"description": "A series of helpers to interact with the Starcraft II Blizzard API",
|
|
7
7
|
"repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/sc2",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": "^
|
|
10
|
+
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
11
11
|
},
|
|
12
12
|
"module": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@blizzard-api/core": "
|
|
35
|
+
"@blizzard-api/core": "3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@blizzard-api/core": "
|
|
38
|
+
"@blizzard-api/core": "3.0.0"
|
|
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"
|