UNPKG

@blizzard-api/sc2

Version:

A series of helpers to interact with the Starcraft II Blizzard API

55 lines (54 loc) 2.17 kB
import { t as starcraftRegion } from "../regions-Dk4G9ABq.js"; //#region src/profile/index.ts /** * Returns the ladder information for the specified profile and ladder. * @param regionId The region ID for Starcraft. * @param realmId 1 or 2 * @param profileId The ID of the profile. * @param ladderId The ID of the ladder. * @returns A resource representing the ladder. See {@link LadderResponse} */ function ladder(regionId, realmId, profileId, ladderId) { return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/${ladderId}` }; } /** * Returns the ladder summary information for the specified profile. * @param regionId The region ID for Starcraft. * @param realmId 1 or 2 * @param profileId The ID of the profile. * @returns A resource representing the ladder summary. See {@link LadderSummaryResponse} */ function ladderSummary(regionId, realmId, profileId) { return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}/ladder/summary` }; } /** * Returns the metadata information for the specified profile. * @param regionId The region ID for Starcraft. * @param realmId 1 or 2 * @param profileId The ID of the profile. * @returns A resource representing the metadata. See {@link MetadataResponse} */ function metadata(regionId, realmId, profileId) { return { path: `/sc2/metadata/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` }; } /** * Returns the profile information for the specified profile. * @param regionId The region ID for Starcraft. * @param realmId 1 or 2 * @param profileId The ID of the profile. * @returns A resource representing the profile. See {@link MetadataResponse} */ function profile(regionId, realmId, profileId) { return { path: `/sc2/profile/${starcraftRegion[regionId]}/${realmId}/${profileId}` }; } /** * * @param regionId The region ID for Starcraft. * @returns A resource representing the static profile. See {@link StaticProfileResponse} */ function staticProfile(regionId) { return { path: `/sc2/static/profile/${starcraftRegion[regionId]}` }; } //#endregion export { ladder, ladderSummary, metadata, profile, staticProfile }; //# sourceMappingURL=index.js.map