Skip to content

Documentation


Documentation / @blizzard-api/sc2 / sc2

Variable: sc2 ​

const sc2: object

Defined in: sc2/src/index.ts:15

Type Declaration ​

getLeagueData ​

getLeagueData: (seasonId, queueId, teamType, leagueId) => object

Returns the league data for the specified season, queue, team type, and league.

Parameters ​

seasonId ​

string

The season ID

queueId ​

StarcraftLeagueQueue

The queue ID

teamType ​

StarcraftLeagueTeamType

The team type

leagueId ​

StarcraftLeagueId

The league ID

Returns ​

The league data resource. See LeagueDataResponse.

_responseType? ​

optional _responseType?: LeagueDataResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

grandmasterLeaderboard ​

grandmasterLeaderboard: (regionId) => object

Returns the grandmaster leaderboard for the specified region.

Parameters ​

regionId ​

StarcraftRegion

The region ID

Returns ​

The grandmaster leaderboard resource. See GrandmasterLeaderboardResponse.

_responseType? ​

optional _responseType?: GrandmasterLeaderboardResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

ladder ​

ladder: (regionId, realmId, profileId, ladderId) => object

Returns the ladder information for the specified profile and ladder.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

ladderId ​

number

The ID of the ladder.

Returns ​

A resource representing the ladder. See LadderResponse

_responseType? ​

optional _responseType?: LadderResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

ladderSummary ​

ladderSummary: (regionId, realmId, profileId) => object

Returns the ladder summary information for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the ladder summary. See LadderSummaryResponse

_responseType? ​

optional _responseType?: LadderSummaryResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyAchievements ​

legacyAchievements: (regionId) => object

Returns the legacy achievements for the specified region.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

Returns ​

A resource representing the legacy achievements. See LegacyAchievementsResponse

_responseType? ​

optional _responseType?: LegacyAchievementsResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyLadder ​

legacyLadder: (regionId, ladderId) => object

Returns the ladder information for the specified ladder.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

ladderId ​

number

The ID of the ladder.

Returns ​

A resource representing the ladder. See LadderResponse

_responseType? ​

optional _responseType?: LegacyLaddersResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyLadders ​

legacyLadders: (regionId, realmId, profileId) => object

Returns the ladders for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the ladders for the given profile. See LegacyLaddersResponse

_responseType? ​

optional _responseType?: LegacyLaddersResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyMatchHistory ​

legacyMatchHistory: (regionId, realmId, profileId) => object

Returns the match history for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the match history for the given profile. See LegacyMatchHistoryResponse

_responseType? ​

optional _responseType?: LegacyMatchHistoryResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyProfile ​

legacyProfile: (regionId, realmId, profileId) => object

Returns the profile for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the profile for the given ID. See LegacyProfileResponse

_responseType? ​

optional _responseType?: LegacyProfileResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

legacyRewards ​

legacyRewards: (regionId) => object

Returns the rewards for the specified region.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

Returns ​

A resource representing the rewards for the given region. See LegacyRewardsResponse

_responseType? ​

optional _responseType?: LegacyRewardsResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

metadata ​

metadata: (regionId, realmId, profileId) => object

Returns the metadata information for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the metadata. See MetadataResponse

_responseType? ​

optional _responseType?: MetadataResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

player ​

player: (accountId) => object

Returns the player information for the specified account ID.

Parameters ​

accountId ​

string

The account ID

Returns ​

The player resource. See Resource.

_responseType? ​

optional _responseType?: unknown[]

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

profile ​

profile: (regionId, realmId, profileId) => object

Returns the profile information for the specified profile.

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

realmId ​

1 | 2

1 or 2

profileId ​

number

The ID of the profile.

Returns ​

A resource representing the profile. See MetadataResponse

_responseType? ​

optional _responseType?: ProfileResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

season ​

season: (regionId) => object

Returns the season information for the specified region.

Parameters ​

regionId ​

StarcraftRegion

The region ID

Returns ​

The season resource. See SeasonResponse.

_responseType? ​

optional _responseType?: SeasonResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.

starcraftRegion ​

starcraftRegion: Record<StarcraftRegion, number>

staticProfile ​

staticProfile: (regionId) => object

Parameters ​

regionId ​

StarcraftRegion

The region ID for Starcraft.

Returns ​

A resource representing the static profile. See StaticProfileResponse

_responseType? ​

optional _responseType?: StaticProfileResponse

Internal

The response type of the resource

namespace? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.