@blizzard-api/sc2 0.1.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +91 -91
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +5 -9
- package/dist/index.cjs +0 -169
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -298
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';
|
|
|
17
17
|
interface GrandmasterLeaderboardResponse {
|
|
18
18
|
ladderTeams: Array<LadderTeam>;
|
|
19
19
|
}
|
|
20
|
+
interface SeasonResponse {
|
|
21
|
+
endDate: string;
|
|
22
|
+
number: number;
|
|
23
|
+
seasonId: number;
|
|
24
|
+
startDate: string;
|
|
25
|
+
year: number;
|
|
26
|
+
}
|
|
20
27
|
interface LadderTeam {
|
|
21
28
|
joinTimestamp: number;
|
|
22
29
|
losses: number;
|
|
@@ -34,13 +41,6 @@ interface TeamMember {
|
|
|
34
41
|
realm: number;
|
|
35
42
|
region: number;
|
|
36
43
|
}
|
|
37
|
-
interface SeasonResponse {
|
|
38
|
-
endDate: string;
|
|
39
|
-
number: number;
|
|
40
|
-
seasonId: number;
|
|
41
|
-
startDate: string;
|
|
42
|
-
year: number;
|
|
43
|
-
}
|
|
44
44
|
|
|
45
45
|
declare function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<GrandmasterLeaderboardResponse>;
|
|
46
46
|
declare function season(regionId: StarcraftRegion): Resource<SeasonResponse>;
|
|
@@ -49,6 +49,14 @@ interface LeagueDataResponse extends ResponseBase {
|
|
|
49
49
|
key: Key;
|
|
50
50
|
tier: Array<Tier>;
|
|
51
51
|
}
|
|
52
|
+
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver';
|
|
53
|
+
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';
|
|
54
|
+
type StarcraftLeagueTeamType = 'arranged' | 'random';
|
|
55
|
+
interface Division {
|
|
56
|
+
id: number;
|
|
57
|
+
ladder_id: number;
|
|
58
|
+
member_count: number;
|
|
59
|
+
}
|
|
52
60
|
interface Key {
|
|
53
61
|
league_id: number;
|
|
54
62
|
queue_id: number;
|
|
@@ -59,17 +67,21 @@ interface Tier {
|
|
|
59
67
|
division: Array<Division>;
|
|
60
68
|
id: number;
|
|
61
69
|
}
|
|
62
|
-
interface Division {
|
|
63
|
-
id: number;
|
|
64
|
-
ladder_id: number;
|
|
65
|
-
member_count: number;
|
|
66
|
-
}
|
|
67
|
-
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';
|
|
68
|
-
type StarcraftLeagueTeamType = 'arranged' | 'random';
|
|
69
|
-
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver';
|
|
70
70
|
|
|
71
71
|
declare function getLeagueData(seasonId: string, queueId: StarcraftLeagueQueue, teamType: StarcraftLeagueTeamType, leagueId: StarcraftLeagueId): Resource<LeagueDataResponse>;
|
|
72
72
|
|
|
73
|
+
interface LegacyAchievementsResponse {
|
|
74
|
+
achievements: Array<Achievement$1>;
|
|
75
|
+
categories: Array<Category$1>;
|
|
76
|
+
}
|
|
77
|
+
interface LegacyLaddersResponse {
|
|
78
|
+
currentSeason: Array<unknown>;
|
|
79
|
+
previousSeason: Array<unknown>;
|
|
80
|
+
showcasePlacement: Array<unknown>;
|
|
81
|
+
}
|
|
82
|
+
interface LegacyMatchHistoryResponse {
|
|
83
|
+
matches: Array<Match>;
|
|
84
|
+
}
|
|
73
85
|
interface LegacyProfileResponse {
|
|
74
86
|
achievements: Achievements;
|
|
75
87
|
campaign: Campaign;
|
|
@@ -85,6 +97,22 @@ interface LegacyProfileResponse {
|
|
|
85
97
|
season: Season;
|
|
86
98
|
swarmLevels: SwarmLevels;
|
|
87
99
|
}
|
|
100
|
+
interface LegacyRewardsResponse {
|
|
101
|
+
animations: Array<Animation>;
|
|
102
|
+
portraits: Array<Animation>;
|
|
103
|
+
protossDecals: Array<Animation>;
|
|
104
|
+
skins: Array<Animation>;
|
|
105
|
+
terranDecals: Array<Animation>;
|
|
106
|
+
zergDecals: Array<Animation>;
|
|
107
|
+
}
|
|
108
|
+
interface Achievement$1 {
|
|
109
|
+
achievementId: string;
|
|
110
|
+
categoryId: string;
|
|
111
|
+
description: string;
|
|
112
|
+
icon: Icon;
|
|
113
|
+
points: number;
|
|
114
|
+
title: string;
|
|
115
|
+
}
|
|
88
116
|
interface Achievements {
|
|
89
117
|
achievements: Array<{
|
|
90
118
|
achievementId: string;
|
|
@@ -92,9 +120,13 @@ interface Achievements {
|
|
|
92
120
|
}>;
|
|
93
121
|
points: Points;
|
|
94
122
|
}
|
|
95
|
-
interface
|
|
96
|
-
|
|
97
|
-
|
|
123
|
+
interface Animation {
|
|
124
|
+
achievementId: string;
|
|
125
|
+
command?: '/dance';
|
|
126
|
+
icon: Icon;
|
|
127
|
+
id: string;
|
|
128
|
+
name?: string;
|
|
129
|
+
title: string;
|
|
98
130
|
}
|
|
99
131
|
interface Campaign {
|
|
100
132
|
hots: string;
|
|
@@ -110,6 +142,12 @@ interface Career {
|
|
|
110
142
|
terranWins: number;
|
|
111
143
|
zergWins: number;
|
|
112
144
|
}
|
|
145
|
+
interface Category$1 {
|
|
146
|
+
categoryId: string;
|
|
147
|
+
children?: Array<Category$1>;
|
|
148
|
+
featuredAchievementId: string;
|
|
149
|
+
title: string;
|
|
150
|
+
}
|
|
113
151
|
interface Icon {
|
|
114
152
|
h: number;
|
|
115
153
|
offset: number;
|
|
@@ -118,6 +156,17 @@ interface Icon {
|
|
|
118
156
|
x: number;
|
|
119
157
|
y: number;
|
|
120
158
|
}
|
|
159
|
+
interface Match {
|
|
160
|
+
date: number;
|
|
161
|
+
decision: 'Left' | 'Loss' | 'Win';
|
|
162
|
+
map: string;
|
|
163
|
+
speed: 'Fast' | 'Faster';
|
|
164
|
+
type: '2v2' | '3v3' | 'Co-Op' | 'Custom';
|
|
165
|
+
}
|
|
166
|
+
interface Points {
|
|
167
|
+
categoryPoints: Record<string, number>;
|
|
168
|
+
totalPoints: number;
|
|
169
|
+
}
|
|
121
170
|
interface Rewards {
|
|
122
171
|
earned: Array<string>;
|
|
123
172
|
selected: Array<string>;
|
|
@@ -145,63 +194,32 @@ interface SwarmLevelsByRace {
|
|
|
145
194
|
level: number;
|
|
146
195
|
totalLevelXP: number;
|
|
147
196
|
}
|
|
148
|
-
interface LegacyLaddersResponse {
|
|
149
|
-
currentSeason: Array<unknown>;
|
|
150
|
-
previousSeason: Array<unknown>;
|
|
151
|
-
showcasePlacement: Array<unknown>;
|
|
152
|
-
}
|
|
153
|
-
interface LegacyMatchHistoryResponse {
|
|
154
|
-
matches: Array<Match>;
|
|
155
|
-
}
|
|
156
|
-
interface Match {
|
|
157
|
-
date: number;
|
|
158
|
-
decision: 'Left' | 'Loss' | 'Win';
|
|
159
|
-
map: string;
|
|
160
|
-
speed: 'Fast' | 'Faster';
|
|
161
|
-
type: '2v2' | '3v3' | 'Co-Op' | 'Custom';
|
|
162
|
-
}
|
|
163
|
-
interface LegacyAchievementsResponse {
|
|
164
|
-
achievements: Array<Achievement$1>;
|
|
165
|
-
categories: Array<Category$1>;
|
|
166
|
-
}
|
|
167
|
-
interface Achievement$1 {
|
|
168
|
-
achievementId: string;
|
|
169
|
-
categoryId: string;
|
|
170
|
-
description: string;
|
|
171
|
-
icon: Icon;
|
|
172
|
-
points: number;
|
|
173
|
-
title: string;
|
|
174
|
-
}
|
|
175
|
-
interface Category$1 {
|
|
176
|
-
categoryId: string;
|
|
177
|
-
children?: Array<Category$1>;
|
|
178
|
-
featuredAchievementId: string;
|
|
179
|
-
title: string;
|
|
180
|
-
}
|
|
181
|
-
interface LegacyRewardsResponse {
|
|
182
|
-
animations: Array<Animation>;
|
|
183
|
-
portraits: Array<Animation>;
|
|
184
|
-
protossDecals: Array<Animation>;
|
|
185
|
-
skins: Array<Animation>;
|
|
186
|
-
terranDecals: Array<Animation>;
|
|
187
|
-
zergDecals: Array<Animation>;
|
|
188
|
-
}
|
|
189
|
-
interface Animation {
|
|
190
|
-
achievementId: string;
|
|
191
|
-
command?: '/dance';
|
|
192
|
-
icon: Icon;
|
|
193
|
-
id: string;
|
|
194
|
-
name?: string;
|
|
195
|
-
title: string;
|
|
196
|
-
}
|
|
197
197
|
|
|
198
|
-
declare function
|
|
198
|
+
declare function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse>;
|
|
199
|
+
declare function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown>;
|
|
199
200
|
declare function legacyLadders(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyLaddersResponse>;
|
|
200
201
|
declare function legacyMatchHistory(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyMatchHistoryResponse>;
|
|
201
|
-
declare function
|
|
202
|
-
declare function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse>;
|
|
202
|
+
declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyProfileResponse>;
|
|
203
203
|
declare function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse>;
|
|
204
204
|
|
|
205
|
+
interface LadderResponse {
|
|
206
|
+
allLadderMemberships: Array<unknown>;
|
|
207
|
+
ladderTeams: Array<unknown>;
|
|
208
|
+
ranksAndPools: Array<unknown>;
|
|
209
|
+
}
|
|
210
|
+
interface LadderSummaryResponse {
|
|
211
|
+
allLadderMemberships: Array<unknown>;
|
|
212
|
+
placementMatches: Array<unknown>;
|
|
213
|
+
showCaseEntries: Array<unknown>;
|
|
214
|
+
}
|
|
215
|
+
interface MetadataResponse {
|
|
216
|
+
avatarUrl: string;
|
|
217
|
+
name: string;
|
|
218
|
+
profileId: string;
|
|
219
|
+
profileUrl: string;
|
|
220
|
+
realmId: number;
|
|
221
|
+
regionId: number;
|
|
222
|
+
}
|
|
205
223
|
interface StaticProfileResponse {
|
|
206
224
|
achievements: Array<Achievement>;
|
|
207
225
|
categories: Array<Category>;
|
|
@@ -252,30 +270,12 @@ interface Reward {
|
|
|
252
270
|
uiOrderHint: number;
|
|
253
271
|
unlockableType: string;
|
|
254
272
|
}
|
|
255
|
-
interface MetadataResponse {
|
|
256
|
-
avatarUrl: string;
|
|
257
|
-
name: string;
|
|
258
|
-
profileId: string;
|
|
259
|
-
profileUrl: string;
|
|
260
|
-
realmId: number;
|
|
261
|
-
regionId: number;
|
|
262
|
-
}
|
|
263
|
-
interface LadderSummaryResponse {
|
|
264
|
-
allLadderMemberships: Array<unknown>;
|
|
265
|
-
placementMatches: Array<unknown>;
|
|
266
|
-
showCaseEntries: Array<unknown>;
|
|
267
|
-
}
|
|
268
|
-
interface LadderResponse {
|
|
269
|
-
allLadderMemberships: Array<unknown>;
|
|
270
|
-
ladderTeams: Array<unknown>;
|
|
271
|
-
ranksAndPools: Array<unknown>;
|
|
272
|
-
}
|
|
273
273
|
|
|
274
|
-
declare function
|
|
274
|
+
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>;
|
|
275
|
+
declare function ladderSummary(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LadderSummaryResponse>;
|
|
275
276
|
declare function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
|
|
276
277
|
declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
|
|
277
|
-
declare function
|
|
278
|
-
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>;
|
|
278
|
+
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>;
|
|
279
279
|
|
|
280
280
|
declare const sc2: {
|
|
281
281
|
player: typeof player;
|
package/dist/index.js
CHANGED
|
@@ -62,9 +62,14 @@ function getLeagueData(seasonId, queueId, teamType, leagueId) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// src/legacy/legacy.ts
|
|
65
|
-
function
|
|
65
|
+
function legacyAchievements(regionId) {
|
|
66
66
|
return {
|
|
67
|
-
path: `/sc2/legacy/
|
|
67
|
+
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function legacyLadder(regionId, ladderId) {
|
|
71
|
+
return {
|
|
72
|
+
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`
|
|
68
73
|
};
|
|
69
74
|
}
|
|
70
75
|
function legacyLadders(regionId, realmId, profileId) {
|
|
@@ -77,14 +82,9 @@ function legacyMatchHistory(regionId, realmId, profileId) {
|
|
|
77
82
|
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`
|
|
78
83
|
};
|
|
79
84
|
}
|
|
80
|
-
function
|
|
81
|
-
return {
|
|
82
|
-
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function legacyAchievements(regionId) {
|
|
85
|
+
function legacyProfile(regionId, realmId, profileId) {
|
|
86
86
|
return {
|
|
87
|
-
path: `/sc2/legacy/
|
|
87
|
+
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function legacyRewards(regionId) {
|
|
@@ -94,9 +94,14 @@ function legacyRewards(regionId) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// src/profile/profile.ts
|
|
97
|
-
function
|
|
97
|
+
function ladder(regionId, realmId, profileId, ladderId) {
|
|
98
98
|
return {
|
|
99
|
-
path: `/sc2/
|
|
99
|
+
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function ladderSummary(regionId, realmId, profileId) {
|
|
103
|
+
return {
|
|
104
|
+
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`
|
|
100
105
|
};
|
|
101
106
|
}
|
|
102
107
|
function metadata(regionId, realmId, profileId) {
|
|
@@ -109,14 +114,9 @@ function profile(regionId, realmId, profileId) {
|
|
|
109
114
|
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
110
115
|
};
|
|
111
116
|
}
|
|
112
|
-
function
|
|
113
|
-
return {
|
|
114
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
function ladder(regionId, realmId, profileId, ladderId) {
|
|
117
|
+
function staticProfile(regionId) {
|
|
118
118
|
return {
|
|
119
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}
|
|
119
|
+
path: `/sc2/static/profile/${starcraftRegion[regionId]}`
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
|
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":";AAEO,SAAS,OAAO,SAA6C,EAAA;AAClE,EAAO,OAAA;AAAA,IACL,IAAA,EAAM,eAAe,SAAS,CAAA,CAAA;AAAA,GA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A,IACL,IAAA,EAAM,CAAgB,aAAA,EAAA,eAAA,CAAgB,QAAQ,CAAC,IAAI,OAAO,CAAA,CAAA,EAAI,SAAS,CAAA,QAAA,EAAW,QAAQ,CAAA,CAAA;AAAA,GAC5F,CAAA;AACF,CAAA;;;AC5BA,IAAM,GAAM,GAAA;AAAA;AAAA,EAEV,MAAA;AAAA;AAAA,EAEA,sBAAA;AAAA,EACA,MAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,kBAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA;AAAA,EAEA,MAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AACF","file":"index.js","sourcesContent":["import type { Resource } from '@blizzard-api/core';\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\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\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\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\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\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\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\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\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\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\nexport function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse> {\r\n return {\r\n path: `/sc2/static/profile/${starcraftRegion[regionId]}`,\r\n };\r\n}\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\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\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\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","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 { sc2 as default, 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,"sources":["../src/account/account.ts","../src/base.ts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AAQ,QAA2B,EAAA,OAAA,EAAgB,SAA+C,EAAA;AAChH,EAAO,OAAA;AAAA,IACL,IAAA,EAAM,gBAAgB,eAAgB,CAAA,QAAQ,CAAC,CAAI,CAAA,EAAA,OAAO,IAAI,SAAS,CAAA,CAAA;AAAA,GACzE,CAAA;AACF,CAAA;AAEO,SAAS,cAAc,QAA4D,EAAA;AACxF,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,CAAA,oBAAA,EAAuB,eAAgB,CAAA,QAAQ,CAAC,CAAA,CAAA;AAAA,GACxD,CAAA;AACF,CAAA;;;AC5BA,IAAM,GAAM,GAAA;AAAA;AAAA,EAEV,MAAA;AAAA;AAAA,EAEA,sBAAA;AAAA,EACA,MAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,kBAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA;AAAA,EAEA,MAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AACF","file":"index.js","sourcesContent":["import type { Resource } from '@blizzard-api/core';\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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 { sc2 as default, 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"]}
|
package/package.json
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blizzard-api/sc2",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
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": "^18.18 ||
|
|
10
|
+
"node": "^18.18 || >=20.9"
|
|
11
11
|
},
|
|
12
|
-
"main": "./dist/index.cjs",
|
|
13
12
|
"module": "./dist/index.js",
|
|
14
13
|
"types": "./dist/index.d.ts",
|
|
15
14
|
"exports": {
|
|
16
15
|
"import": {
|
|
16
|
+
"@blizzard-api/sc2-local": "./src/index.ts",
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
|
-
},
|
|
20
|
-
"require": {
|
|
21
|
-
"types": "./dist/index.d.cts",
|
|
22
|
-
"default": "./dist/index.cjs"
|
|
23
19
|
}
|
|
24
20
|
},
|
|
25
21
|
"files": [
|
|
@@ -36,10 +32,10 @@
|
|
|
36
32
|
],
|
|
37
33
|
"dependencies": {},
|
|
38
34
|
"peerDependencies": {
|
|
39
|
-
"@blizzard-api/core": "
|
|
35
|
+
"@blizzard-api/core": "2.0.1"
|
|
40
36
|
},
|
|
41
37
|
"devDependencies": {
|
|
42
|
-
"@blizzard-api/core": "
|
|
38
|
+
"@blizzard-api/core": "2.0.1"
|
|
43
39
|
},
|
|
44
40
|
"scripts": {
|
|
45
41
|
"build": "tsup",
|
package/dist/index.cjs
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
// src/account/account.ts
|
|
6
|
-
function player(accountId) {
|
|
7
|
-
return {
|
|
8
|
-
path: `/sc2/player/${accountId}`
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/base.ts
|
|
13
|
-
var starcraftRegion = {
|
|
14
|
-
cn: 5,
|
|
15
|
-
eu: 2,
|
|
16
|
-
kr: 3,
|
|
17
|
-
tw: 3,
|
|
18
|
-
us: 1
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// src/ladder/ladder.ts
|
|
22
|
-
function grandmasterLeaderboard(regionId) {
|
|
23
|
-
return {
|
|
24
|
-
path: `/sc2/ladder/grandmaster/${starcraftRegion[regionId]}`
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function season(regionId) {
|
|
28
|
-
return {
|
|
29
|
-
path: `/sc2/ladder/season/${starcraftRegion[regionId]}`
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// src/league/league.ts
|
|
34
|
-
var starcraftLeagueQueue = {
|
|
35
|
-
"hots-1v1": 101,
|
|
36
|
-
"hots-2v2": 102,
|
|
37
|
-
"hots-3v3": 103,
|
|
38
|
-
"hots-4v4": 104,
|
|
39
|
-
"lotv-1v1": 201,
|
|
40
|
-
"lotv-2v2": 202,
|
|
41
|
-
"lotv-3v3": 203,
|
|
42
|
-
"lotv-4v4": 204,
|
|
43
|
-
"lotv-archon": 206,
|
|
44
|
-
"wol-1v1": 1,
|
|
45
|
-
"wol-2v2": 2,
|
|
46
|
-
"wol-3v3": 3,
|
|
47
|
-
"wol-4v4": 4
|
|
48
|
-
};
|
|
49
|
-
var starcraftLeagueTeam = {
|
|
50
|
-
arranged: 0,
|
|
51
|
-
random: 1
|
|
52
|
-
};
|
|
53
|
-
var starcraftLeagueId = {
|
|
54
|
-
bronze: 0,
|
|
55
|
-
diamond: 4,
|
|
56
|
-
gold: 2,
|
|
57
|
-
grandmaster: 6,
|
|
58
|
-
master: 5,
|
|
59
|
-
platinum: 3,
|
|
60
|
-
silver: 1
|
|
61
|
-
};
|
|
62
|
-
function getLeagueData(seasonId, queueId, teamType, leagueId) {
|
|
63
|
-
return {
|
|
64
|
-
path: `/data/sc2/league/${seasonId}/${starcraftLeagueQueue[queueId]}/${starcraftLeagueTeam[teamType]}/${starcraftLeagueId[leagueId]}`
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/legacy/legacy.ts
|
|
69
|
-
function legacyProfile(regionId, realmId, profileId) {
|
|
70
|
-
return {
|
|
71
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function legacyLadders(regionId, realmId, profileId) {
|
|
75
|
-
return {
|
|
76
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladders`
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function legacyMatchHistory(regionId, realmId, profileId) {
|
|
80
|
-
return {
|
|
81
|
-
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/matches`
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function legacyLadder(regionId, ladderId) {
|
|
85
|
-
return {
|
|
86
|
-
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}`
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function legacyAchievements(regionId) {
|
|
90
|
-
return {
|
|
91
|
-
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}`
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function legacyRewards(regionId) {
|
|
95
|
-
return {
|
|
96
|
-
path: `/sc2/legacy/data/rewards/${starcraftRegion[regionId]}`
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// src/profile/profile.ts
|
|
101
|
-
function staticProfile(regionId) {
|
|
102
|
-
return {
|
|
103
|
-
path: `/sc2/static/profile/${starcraftRegion[regionId]}`
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function metadata(regionId, realmId, profileId) {
|
|
107
|
-
return {
|
|
108
|
-
path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function profile(regionId, realmId, profileId) {
|
|
112
|
-
return {
|
|
113
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}`
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function ladderSummary(regionId, realmId, profileId) {
|
|
117
|
-
return {
|
|
118
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary`
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function ladder(regionId, realmId, profileId, ladderId) {
|
|
122
|
-
return {
|
|
123
|
-
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}`
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// src/index.ts
|
|
128
|
-
var sc2 = {
|
|
129
|
-
//Account
|
|
130
|
-
player,
|
|
131
|
-
//Ladder
|
|
132
|
-
grandmasterLeaderboard,
|
|
133
|
-
season,
|
|
134
|
-
//League
|
|
135
|
-
getLeagueData,
|
|
136
|
-
//Legacy
|
|
137
|
-
legacyAchievements,
|
|
138
|
-
legacyLadder,
|
|
139
|
-
legacyLadders,
|
|
140
|
-
legacyMatchHistory,
|
|
141
|
-
legacyProfile,
|
|
142
|
-
legacyRewards,
|
|
143
|
-
//Profile
|
|
144
|
-
ladder,
|
|
145
|
-
ladderSummary,
|
|
146
|
-
metadata,
|
|
147
|
-
profile,
|
|
148
|
-
staticProfile
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
exports.default = sc2;
|
|
152
|
-
exports.getLeagueData = getLeagueData;
|
|
153
|
-
exports.grandmasterLeaderboard = grandmasterLeaderboard;
|
|
154
|
-
exports.ladder = ladder;
|
|
155
|
-
exports.ladderSummary = ladderSummary;
|
|
156
|
-
exports.legacyAchievements = legacyAchievements;
|
|
157
|
-
exports.legacyLadder = legacyLadder;
|
|
158
|
-
exports.legacyLadders = legacyLadders;
|
|
159
|
-
exports.legacyMatchHistory = legacyMatchHistory;
|
|
160
|
-
exports.legacyProfile = legacyProfile;
|
|
161
|
-
exports.legacyRewards = legacyRewards;
|
|
162
|
-
exports.metadata = metadata;
|
|
163
|
-
exports.player = player;
|
|
164
|
-
exports.profile = profile;
|
|
165
|
-
exports.sc2 = sc2;
|
|
166
|
-
exports.season = season;
|
|
167
|
-
exports.staticProfile = staticProfile;
|
|
168
|
-
//# sourceMappingURL=index.cjs.map
|
|
169
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":";;;;;AAEO,SAAS,OAAO,SAA6C,EAAA;AAClE,EAAO,OAAA;AAAA,IACL,IAAA,EAAM,eAAe,SAAS,CAAA,CAAA;AAAA,GAChC,CAAA;AACF,CAAA;;;ACQO,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,CAAA;AACN,CAAA,CAAA;;;AChBO,SAAS,uBAAuB,QAAqE,EAAA;AAC1G,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,CAAA,wBAAA,EAA2B,eAAgB,CAAA,QAAQ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EACA,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA;AAAA,EAEA,MAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AACF","file":"index.cjs","sourcesContent":["import type { Resource } from '@blizzard-api/core';\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\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\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\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\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\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\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\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\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\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\nexport function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse> {\r\n return {\r\n path: `/sc2/static/profile/${starcraftRegion[regionId]}`,\r\n };\r\n}\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\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\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\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","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 { sc2 as default, 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"]}
|
package/dist/index.d.cts
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import { Resource } from '@blizzard-api/core';
|
|
2
|
-
|
|
3
|
-
declare function player(accountId: string): Resource<Array<unknown>>;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Base interface for Blizzard API responses.
|
|
7
|
-
*/
|
|
8
|
-
interface ResponseBase {
|
|
9
|
-
_links: {
|
|
10
|
-
self: {
|
|
11
|
-
href: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
type StarcraftRegion = 'cn' | 'eu' | 'kr' | 'tw' | 'us';
|
|
16
|
-
|
|
17
|
-
interface GrandmasterLeaderboardResponse {
|
|
18
|
-
ladderTeams: Array<LadderTeam>;
|
|
19
|
-
}
|
|
20
|
-
interface LadderTeam {
|
|
21
|
-
joinTimestamp: number;
|
|
22
|
-
losses: number;
|
|
23
|
-
mmr: number;
|
|
24
|
-
points: number;
|
|
25
|
-
previousRank: number;
|
|
26
|
-
teamMembers: Array<TeamMember>;
|
|
27
|
-
wins: number;
|
|
28
|
-
}
|
|
29
|
-
interface TeamMember {
|
|
30
|
-
clanTag?: string;
|
|
31
|
-
displayName: string;
|
|
32
|
-
favoriteRace: 'protoss' | 'random' | 'terran' | 'zerg';
|
|
33
|
-
id: string;
|
|
34
|
-
realm: number;
|
|
35
|
-
region: number;
|
|
36
|
-
}
|
|
37
|
-
interface SeasonResponse {
|
|
38
|
-
endDate: string;
|
|
39
|
-
number: number;
|
|
40
|
-
seasonId: number;
|
|
41
|
-
startDate: string;
|
|
42
|
-
year: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
declare function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<GrandmasterLeaderboardResponse>;
|
|
46
|
-
declare function season(regionId: StarcraftRegion): Resource<SeasonResponse>;
|
|
47
|
-
|
|
48
|
-
interface LeagueDataResponse extends ResponseBase {
|
|
49
|
-
key: Key;
|
|
50
|
-
tier: Array<Tier>;
|
|
51
|
-
}
|
|
52
|
-
interface Key {
|
|
53
|
-
league_id: number;
|
|
54
|
-
queue_id: number;
|
|
55
|
-
season_id: number;
|
|
56
|
-
team_type: number;
|
|
57
|
-
}
|
|
58
|
-
interface Tier {
|
|
59
|
-
division: Array<Division>;
|
|
60
|
-
id: number;
|
|
61
|
-
}
|
|
62
|
-
interface Division {
|
|
63
|
-
id: number;
|
|
64
|
-
ladder_id: number;
|
|
65
|
-
member_count: number;
|
|
66
|
-
}
|
|
67
|
-
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';
|
|
68
|
-
type StarcraftLeagueTeamType = 'arranged' | 'random';
|
|
69
|
-
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver';
|
|
70
|
-
|
|
71
|
-
declare function getLeagueData(seasonId: string, queueId: StarcraftLeagueQueue, teamType: StarcraftLeagueTeamType, leagueId: StarcraftLeagueId): Resource<LeagueDataResponse>;
|
|
72
|
-
|
|
73
|
-
interface LegacyProfileResponse {
|
|
74
|
-
achievements: Achievements;
|
|
75
|
-
campaign: Campaign;
|
|
76
|
-
career: Career;
|
|
77
|
-
clanName: string;
|
|
78
|
-
clanTag: string;
|
|
79
|
-
displayName: string;
|
|
80
|
-
id: string;
|
|
81
|
-
portrait: Icon;
|
|
82
|
-
profilePath: string;
|
|
83
|
-
realm: number;
|
|
84
|
-
rewards: Rewards;
|
|
85
|
-
season: Season;
|
|
86
|
-
swarmLevels: SwarmLevels;
|
|
87
|
-
}
|
|
88
|
-
interface Achievements {
|
|
89
|
-
achievements: Array<{
|
|
90
|
-
achievementId: string;
|
|
91
|
-
completionDate: number;
|
|
92
|
-
}>;
|
|
93
|
-
points: Points;
|
|
94
|
-
}
|
|
95
|
-
interface Points {
|
|
96
|
-
categoryPoints: Record<string, number>;
|
|
97
|
-
totalPoints: number;
|
|
98
|
-
}
|
|
99
|
-
interface Campaign {
|
|
100
|
-
hots: string;
|
|
101
|
-
wol: string;
|
|
102
|
-
}
|
|
103
|
-
interface Career {
|
|
104
|
-
careerTotalGames: number;
|
|
105
|
-
highest1v1Rank: string;
|
|
106
|
-
highestTeamRank: string;
|
|
107
|
-
primaryRace: string;
|
|
108
|
-
protossWins: number;
|
|
109
|
-
seasonTotalGames: number;
|
|
110
|
-
terranWins: number;
|
|
111
|
-
zergWins: number;
|
|
112
|
-
}
|
|
113
|
-
interface Icon {
|
|
114
|
-
h: number;
|
|
115
|
-
offset: number;
|
|
116
|
-
url: string;
|
|
117
|
-
w: number;
|
|
118
|
-
x: number;
|
|
119
|
-
y: number;
|
|
120
|
-
}
|
|
121
|
-
interface Rewards {
|
|
122
|
-
earned: Array<string>;
|
|
123
|
-
selected: Array<string>;
|
|
124
|
-
}
|
|
125
|
-
interface Season {
|
|
126
|
-
seasonId: number;
|
|
127
|
-
seasonNumber: number;
|
|
128
|
-
seasonYear: number;
|
|
129
|
-
stats: Array<Stat>;
|
|
130
|
-
totalGamesThisSeason: number;
|
|
131
|
-
}
|
|
132
|
-
interface Stat {
|
|
133
|
-
games: number;
|
|
134
|
-
type: string;
|
|
135
|
-
wins: number;
|
|
136
|
-
}
|
|
137
|
-
interface SwarmLevels {
|
|
138
|
-
level: number;
|
|
139
|
-
protoss: SwarmLevelsByRace;
|
|
140
|
-
terran: SwarmLevelsByRace;
|
|
141
|
-
zerg: SwarmLevelsByRace;
|
|
142
|
-
}
|
|
143
|
-
interface SwarmLevelsByRace {
|
|
144
|
-
currentLevelXP: number;
|
|
145
|
-
level: number;
|
|
146
|
-
totalLevelXP: number;
|
|
147
|
-
}
|
|
148
|
-
interface LegacyLaddersResponse {
|
|
149
|
-
currentSeason: Array<unknown>;
|
|
150
|
-
previousSeason: Array<unknown>;
|
|
151
|
-
showcasePlacement: Array<unknown>;
|
|
152
|
-
}
|
|
153
|
-
interface LegacyMatchHistoryResponse {
|
|
154
|
-
matches: Array<Match>;
|
|
155
|
-
}
|
|
156
|
-
interface Match {
|
|
157
|
-
date: number;
|
|
158
|
-
decision: 'Left' | 'Loss' | 'Win';
|
|
159
|
-
map: string;
|
|
160
|
-
speed: 'Fast' | 'Faster';
|
|
161
|
-
type: '2v2' | '3v3' | 'Co-Op' | 'Custom';
|
|
162
|
-
}
|
|
163
|
-
interface LegacyAchievementsResponse {
|
|
164
|
-
achievements: Array<Achievement$1>;
|
|
165
|
-
categories: Array<Category$1>;
|
|
166
|
-
}
|
|
167
|
-
interface Achievement$1 {
|
|
168
|
-
achievementId: string;
|
|
169
|
-
categoryId: string;
|
|
170
|
-
description: string;
|
|
171
|
-
icon: Icon;
|
|
172
|
-
points: number;
|
|
173
|
-
title: string;
|
|
174
|
-
}
|
|
175
|
-
interface Category$1 {
|
|
176
|
-
categoryId: string;
|
|
177
|
-
children?: Array<Category$1>;
|
|
178
|
-
featuredAchievementId: string;
|
|
179
|
-
title: string;
|
|
180
|
-
}
|
|
181
|
-
interface LegacyRewardsResponse {
|
|
182
|
-
animations: Array<Animation>;
|
|
183
|
-
portraits: Array<Animation>;
|
|
184
|
-
protossDecals: Array<Animation>;
|
|
185
|
-
skins: Array<Animation>;
|
|
186
|
-
terranDecals: Array<Animation>;
|
|
187
|
-
zergDecals: Array<Animation>;
|
|
188
|
-
}
|
|
189
|
-
interface Animation {
|
|
190
|
-
achievementId: string;
|
|
191
|
-
command?: '/dance';
|
|
192
|
-
icon: Icon;
|
|
193
|
-
id: string;
|
|
194
|
-
name?: string;
|
|
195
|
-
title: string;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyProfileResponse>;
|
|
199
|
-
declare function legacyLadders(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyLaddersResponse>;
|
|
200
|
-
declare function legacyMatchHistory(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyMatchHistoryResponse>;
|
|
201
|
-
declare function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown>;
|
|
202
|
-
declare function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse>;
|
|
203
|
-
declare function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse>;
|
|
204
|
-
|
|
205
|
-
interface StaticProfileResponse {
|
|
206
|
-
achievements: Array<Achievement>;
|
|
207
|
-
categories: Array<Category>;
|
|
208
|
-
criteria: Array<Criterion>;
|
|
209
|
-
rewards: Array<Reward>;
|
|
210
|
-
}
|
|
211
|
-
interface Achievement {
|
|
212
|
-
categoryId: string;
|
|
213
|
-
chainAchievementIds: Array<string>;
|
|
214
|
-
chainRewardSize: number;
|
|
215
|
-
criteriaIds?: Array<string>;
|
|
216
|
-
description: string;
|
|
217
|
-
flags: number;
|
|
218
|
-
id: string;
|
|
219
|
-
imageUrl: string;
|
|
220
|
-
isChained: boolean;
|
|
221
|
-
points: number;
|
|
222
|
-
title: string;
|
|
223
|
-
uiOrderHint: number;
|
|
224
|
-
}
|
|
225
|
-
interface Category {
|
|
226
|
-
childrenCategoryIds: Array<string>;
|
|
227
|
-
featuredAchievementId: string;
|
|
228
|
-
id: string;
|
|
229
|
-
medalTiers?: Array<number>;
|
|
230
|
-
name: string;
|
|
231
|
-
parentCategoryId: null | string;
|
|
232
|
-
points: number;
|
|
233
|
-
uiOrderHint: number;
|
|
234
|
-
}
|
|
235
|
-
interface Criterion {
|
|
236
|
-
achievementId: string;
|
|
237
|
-
description: string;
|
|
238
|
-
evaluationClass: 'Achv' | 'Clnt' | 'S2Gm' | 'Sunk' | 'Trny';
|
|
239
|
-
flags: number;
|
|
240
|
-
id: string;
|
|
241
|
-
necessaryQuantity: number;
|
|
242
|
-
uiOrderHint: number;
|
|
243
|
-
}
|
|
244
|
-
interface Reward {
|
|
245
|
-
achievementId?: string;
|
|
246
|
-
command?: '/dance';
|
|
247
|
-
flags: number;
|
|
248
|
-
id: string;
|
|
249
|
-
imageUrl: string;
|
|
250
|
-
isSkin: boolean;
|
|
251
|
-
name: string;
|
|
252
|
-
uiOrderHint: number;
|
|
253
|
-
unlockableType: string;
|
|
254
|
-
}
|
|
255
|
-
interface MetadataResponse {
|
|
256
|
-
avatarUrl: string;
|
|
257
|
-
name: string;
|
|
258
|
-
profileId: string;
|
|
259
|
-
profileUrl: string;
|
|
260
|
-
realmId: number;
|
|
261
|
-
regionId: number;
|
|
262
|
-
}
|
|
263
|
-
interface LadderSummaryResponse {
|
|
264
|
-
allLadderMemberships: Array<unknown>;
|
|
265
|
-
placementMatches: Array<unknown>;
|
|
266
|
-
showCaseEntries: Array<unknown>;
|
|
267
|
-
}
|
|
268
|
-
interface LadderResponse {
|
|
269
|
-
allLadderMemberships: Array<unknown>;
|
|
270
|
-
ladderTeams: Array<unknown>;
|
|
271
|
-
ranksAndPools: Array<unknown>;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>;
|
|
275
|
-
declare function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
|
|
276
|
-
declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
|
|
277
|
-
declare function ladderSummary(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LadderSummaryResponse>;
|
|
278
|
-
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>;
|
|
279
|
-
|
|
280
|
-
declare const sc2: {
|
|
281
|
-
player: typeof player;
|
|
282
|
-
grandmasterLeaderboard: typeof grandmasterLeaderboard;
|
|
283
|
-
season: typeof season;
|
|
284
|
-
getLeagueData: typeof getLeagueData;
|
|
285
|
-
legacyAchievements: typeof legacyAchievements;
|
|
286
|
-
legacyLadder: typeof legacyLadder;
|
|
287
|
-
legacyLadders: typeof legacyLadders;
|
|
288
|
-
legacyMatchHistory: typeof legacyMatchHistory;
|
|
289
|
-
legacyProfile: typeof legacyProfile;
|
|
290
|
-
legacyRewards: typeof legacyRewards;
|
|
291
|
-
ladder: typeof ladder;
|
|
292
|
-
ladderSummary: typeof ladderSummary;
|
|
293
|
-
metadata: typeof metadata;
|
|
294
|
-
profile: typeof profile;
|
|
295
|
-
staticProfile: typeof staticProfile;
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
export { type GrandmasterLeaderboardResponse, type LadderResponse, type LadderSummaryResponse, type LeagueDataResponse, type LegacyAchievementsResponse, type LegacyLaddersResponse, type LegacyMatchHistoryResponse, type LegacyProfileResponse, type LegacyRewardsResponse, type MetadataResponse, type SeasonResponse, type StarcraftLeagueId, type StarcraftLeagueQueue, type StarcraftLeagueTeamType, type StaticProfileResponse, sc2 as default, getLeagueData, grandmasterLeaderboard, ladder, ladderSummary, legacyAchievements, legacyLadder, legacyLadders, legacyMatchHistory, legacyProfile, legacyRewards, metadata, player, profile, sc2, season, staticProfile };
|