@blizzard-api/sc2
Version:
A series of helpers to interact with the Starcraft II Blizzard API
116 lines (115 loc) • 3.83 kB
TypeScript
import { t as StarcraftRegion } from "./regions-C2THJaaU.js";
import { Resource } from "@blizzard-api/core";
//#region src/profile/types.d.ts
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 {
achievements: Array<Achievement>;
categories: Array<Category>;
criteria: Array<Criterion>;
rewards: Array<Reward>;
}
interface Achievement {
categoryId: string;
chainAchievementIds: Array<string>;
chainRewardSize: number;
criteriaIds?: Array<string>;
description: string;
flags: number;
id: string;
imageUrl: string;
isChained: boolean;
points: number;
title: string;
uiOrderHint: number;
}
interface Category {
childrenCategoryIds: Array<string>;
featuredAchievementId: string;
id: string;
medalTiers?: Array<number>;
name: string;
parentCategoryId: null | string;
points: number;
uiOrderHint: number;
}
interface Criterion {
achievementId: string;
description: string;
evaluationClass: 'Achv' | 'Clnt' | 'S2Gm' | 'Sunk' | 'Trny';
flags: number;
id: string;
necessaryQuantity: number;
uiOrderHint: number;
}
interface Reward {
achievementId?: string;
command?: '/dance';
flags: number;
id: string;
imageUrl: string;
isSkin: boolean;
name: string;
uiOrderHint: number;
unlockableType: string;
}
//#endregion
//#region src/profile/index.d.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}
*/
declare function ladder(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number, ladderId: number): Resource<LadderResponse>;
/**
* 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}
*/
declare function ladderSummary(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<LadderSummaryResponse>;
/**
* 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}
*/
declare function metadata(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
/**
* 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}
*/
declare function profile(regionId: StarcraftRegion, realmId: 1 | 2, profileId: number): Resource<MetadataResponse>;
/**
*
* @param regionId The region ID for Starcraft.
* @returns A resource representing the static profile. See {@link StaticProfileResponse}
*/
declare function staticProfile(regionId: StarcraftRegion): Resource<StaticProfileResponse>;
//#endregion
export { staticProfile as a, MetadataResponse as c, profile as i, StaticProfileResponse as l, ladderSummary as n, LadderResponse as o, metadata as r, LadderSummaryResponse as s, ladder as t };
//# sourceMappingURL=index-E_sUhfIc.d.ts.map