@blizzard-api/sc2
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -20,2 +20,9 @@ import { Resource } from '@blizzard-api/core'; | ||
} | ||
interface SeasonResponse { | ||
endDate: string; | ||
number: number; | ||
seasonId: number; | ||
startDate: string; | ||
year: number; | ||
} | ||
interface LadderTeam { | ||
@@ -38,9 +45,2 @@ joinTimestamp: number; | ||
} | ||
interface SeasonResponse { | ||
endDate: string; | ||
number: number; | ||
seasonId: number; | ||
startDate: string; | ||
year: number; | ||
} | ||
@@ -54,2 +54,10 @@ declare function grandmasterLeaderboard(regionId: StarcraftRegion): Resource<GrandmasterLeaderboardResponse>; | ||
} | ||
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver'; | ||
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'; | ||
type StarcraftLeagueTeamType = 'arranged' | 'random'; | ||
interface Division { | ||
id: number; | ||
ladder_id: number; | ||
member_count: number; | ||
} | ||
interface Key { | ||
@@ -65,13 +73,17 @@ league_id: number; | ||
} | ||
interface Division { | ||
id: number; | ||
ladder_id: number; | ||
member_count: number; | ||
} | ||
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'; | ||
type StarcraftLeagueTeamType = 'arranged' | 'random'; | ||
type StarcraftLeagueId = 'bronze' | 'diamond' | 'gold' | 'grandmaster' | 'master' | 'platinum' | 'silver'; | ||
declare function getLeagueData(seasonId: string, queueId: StarcraftLeagueQueue, teamType: StarcraftLeagueTeamType, leagueId: StarcraftLeagueId): Resource<LeagueDataResponse>; | ||
interface LegacyAchievementsResponse { | ||
achievements: Array<Achievement$1>; | ||
categories: Array<Category$1>; | ||
} | ||
interface LegacyLaddersResponse { | ||
currentSeason: Array<unknown>; | ||
previousSeason: Array<unknown>; | ||
showcasePlacement: Array<unknown>; | ||
} | ||
interface LegacyMatchHistoryResponse { | ||
matches: Array<Match>; | ||
} | ||
interface LegacyProfileResponse { | ||
@@ -92,2 +104,18 @@ achievements: Achievements; | ||
} | ||
interface LegacyRewardsResponse { | ||
animations: Array<Animation>; | ||
portraits: Array<Animation>; | ||
protossDecals: Array<Animation>; | ||
skins: Array<Animation>; | ||
terranDecals: Array<Animation>; | ||
zergDecals: Array<Animation>; | ||
} | ||
interface Achievement$1 { | ||
achievementId: string; | ||
categoryId: string; | ||
description: string; | ||
icon: Icon; | ||
points: number; | ||
title: string; | ||
} | ||
interface Achievements { | ||
@@ -100,5 +128,9 @@ achievements: Array<{ | ||
} | ||
interface Points { | ||
categoryPoints: Record<string, number>; | ||
totalPoints: number; | ||
interface Animation { | ||
achievementId: string; | ||
command?: '/dance'; | ||
icon: Icon; | ||
id: string; | ||
name?: string; | ||
title: string; | ||
} | ||
@@ -119,2 +151,8 @@ interface Campaign { | ||
} | ||
interface Category$1 { | ||
categoryId: string; | ||
children?: Array<Category$1>; | ||
featuredAchievementId: string; | ||
title: string; | ||
} | ||
interface Icon { | ||
@@ -128,2 +166,13 @@ h: number; | ||
} | ||
interface Match { | ||
date: number; | ||
decision: 'Left' | 'Loss' | 'Win'; | ||
map: string; | ||
speed: 'Fast' | 'Faster'; | ||
type: '2v2' | '3v3' | 'Co-Op' | 'Custom'; | ||
} | ||
interface Points { | ||
categoryPoints: Record<string, number>; | ||
totalPoints: number; | ||
} | ||
interface Rewards { | ||
@@ -156,59 +205,28 @@ earned: Array<string>; | ||
} | ||
interface LegacyLaddersResponse { | ||
currentSeason: Array<unknown>; | ||
previousSeason: Array<unknown>; | ||
showcasePlacement: Array<unknown>; | ||
} | ||
interface LegacyMatchHistoryResponse { | ||
matches: Array<Match>; | ||
} | ||
interface Match { | ||
date: number; | ||
decision: 'Left' | 'Loss' | 'Win'; | ||
map: string; | ||
speed: 'Fast' | 'Faster'; | ||
type: '2v2' | '3v3' | 'Co-Op' | 'Custom'; | ||
} | ||
interface LegacyAchievementsResponse { | ||
achievements: Array<Achievement$1>; | ||
categories: Array<Category$1>; | ||
} | ||
interface Achievement$1 { | ||
achievementId: string; | ||
categoryId: string; | ||
description: string; | ||
icon: Icon; | ||
points: number; | ||
title: string; | ||
} | ||
interface Category$1 { | ||
categoryId: string; | ||
children?: Array<Category$1>; | ||
featuredAchievementId: string; | ||
title: string; | ||
} | ||
interface LegacyRewardsResponse { | ||
animations: Array<Animation>; | ||
portraits: Array<Animation>; | ||
protossDecals: Array<Animation>; | ||
skins: Array<Animation>; | ||
terranDecals: Array<Animation>; | ||
zergDecals: Array<Animation>; | ||
} | ||
interface Animation { | ||
achievementId: string; | ||
command?: '/dance'; | ||
icon: Icon; | ||
id: string; | ||
name?: string; | ||
title: string; | ||
} | ||
declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyProfileResponse>; | ||
declare function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse>; | ||
declare function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown>; | ||
declare function legacyLadders(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyLaddersResponse>; | ||
declare function legacyMatchHistory(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyMatchHistoryResponse>; | ||
declare function legacyLadder(regionId: StarcraftRegion, ladderId: number): Resource<unknown>; | ||
declare function legacyAchievements(regionId: StarcraftRegion): Resource<LegacyAchievementsResponse>; | ||
declare function legacyProfile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LegacyProfileResponse>; | ||
declare function legacyRewards(regionId: StarcraftRegion): Resource<LegacyRewardsResponse>; | ||
interface LadderResponse { | ||
allLadderMemberships: Array<unknown>; | ||
ladderTeams: Array<unknown>; | ||
ranksAndPools: Array<unknown>; | ||
} | ||
interface LadderSummaryResponse { | ||
allLadderMemberships: Array<unknown>; | ||
placementMatches: Array<unknown>; | ||
showCaseEntries: Array<unknown>; | ||
} | ||
interface MetadataResponse { | ||
avatarUrl: string; | ||
name: string; | ||
profileId: string; | ||
profileUrl: string; | ||
realmId: number; | ||
regionId: number; | ||
} | ||
interface StaticProfileResponse { | ||
@@ -264,26 +282,8 @@ achievements: Array<Achievement>; | ||
} | ||
interface MetadataResponse { | ||
avatarUrl: string; | ||
name: string; | ||
profileId: string; | ||
profileUrl: string; | ||
realmId: number; | ||
regionId: number; | ||
} | ||
interface LadderSummaryResponse { | ||
allLadderMemberships: Array<unknown>; | ||
placementMatches: Array<unknown>; | ||
showCaseEntries: Array<unknown>; | ||
} | ||
interface LadderResponse { | ||
allLadderMemberships: Array<unknown>; | ||
ladderTeams: Array<unknown>; | ||
ranksAndPools: Array<unknown>; | ||
} | ||
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>; | ||
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>; | ||
declare function ladderSummary(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LadderSummaryResponse>; | ||
declare function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>; | ||
declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>; | ||
declare function ladderSummary(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LadderSummaryResponse>; | ||
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>; | ||
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>; | ||
@@ -290,0 +290,0 @@ declare const sc2: { |
@@ -65,7 +65,12 @@ // src/account/account.ts | ||
// src/legacy/legacy.ts | ||
function legacyProfile(regionId, realmId, profileId) { | ||
function legacyAchievements(regionId) { | ||
return { | ||
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` | ||
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}` | ||
}; | ||
} | ||
function legacyLadder(regionId, ladderId) { | ||
return { | ||
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}` | ||
}; | ||
} | ||
function legacyLadders(regionId, realmId, profileId) { | ||
@@ -81,12 +86,7 @@ return { | ||
} | ||
function legacyLadder(regionId, ladderId) { | ||
function legacyProfile(regionId, realmId, profileId) { | ||
return { | ||
path: `/sc2/legacy/ladder/${starcraftRegion[regionId]}/${ladderId}` | ||
path: `/sc2/legacy/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` | ||
}; | ||
} | ||
function legacyAchievements(regionId) { | ||
return { | ||
path: `/sc2/legacy/data/achievements/${starcraftRegion[regionId]}` | ||
}; | ||
} | ||
function legacyRewards(regionId) { | ||
@@ -99,7 +99,12 @@ return { | ||
// src/profile/profile.ts | ||
function staticProfile(regionId) { | ||
function ladder(regionId, realmId, profileId, ladderId) { | ||
return { | ||
path: `/sc2/static/profile/${starcraftRegion[regionId]}` | ||
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}` | ||
}; | ||
} | ||
function ladderSummary(regionId, realmId, profileId) { | ||
return { | ||
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary` | ||
}; | ||
} | ||
function metadata(regionId, realmId, profileId) { | ||
@@ -115,12 +120,7 @@ return { | ||
} | ||
function ladderSummary(regionId, realmId, profileId) { | ||
function staticProfile(regionId) { | ||
return { | ||
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary` | ||
path: `/sc2/static/profile/${starcraftRegion[regionId]}` | ||
}; | ||
} | ||
function ladder(regionId, realmId, profileId, ladderId) { | ||
return { | ||
path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}` | ||
}; | ||
} | ||
@@ -127,0 +127,0 @@ // src/index.ts |
{ | ||
"name": "@blizzard-api/sc2", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -35,6 +35,6 @@ "author": "Putro", | ||
"peerDependencies": { | ||
"@blizzard-api/core": "2.0.0" | ||
"@blizzard-api/core": "2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@blizzard-api/core": "2.0.0" | ||
"@blizzard-api/core": "2.0.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet