guildwars2-ts
Version:
GuildWars 2 API Wrapper in Typescript
390 lines (389 loc) • 12.1 kB
TypeScript
import { ApiBase } from '../../base/apiBase';
/**
* /v2/account Api
*/
export declare class AccountApi extends ApiBase {
/**
* Returns information about player accounts.
*/
get(): Promise<{
id: string;
age: number;
name: string;
world: number;
guilds: string[];
guild_leader: string[];
created: string;
access: string[];
commander: boolean;
fractal_level: number;
daily_ap: number;
monthly_ap: number;
wvw_rank: number;
last_modified?: string | undefined;
build_storage_slots?: number | undefined;
}>;
/**
* Returns an account's progress towards all their achievements.
*/
getAchievements(): Promise<{
id: number;
current: number;
done: boolean;
bits?: number[] | undefined;
max?: number | undefined;
repeated?: number | undefined;
unlocked?: boolean | undefined;
}[]>;
/**
* Returns the items stored in a player's vault (not including material storage).
* If null, the slot is empty.
*/
getBank(): Promise<({
id: number;
count: number;
charges?: number | undefined;
skin?: number | undefined;
dyes?: number[] | undefined;
upgrades?: number[] | undefined;
upgrade_slot_indices?: number[] | undefined;
infusions?: number[] | undefined;
stats?: {
id: number;
attributes: {
AgonyResistance?: number | undefined;
BoonDuration?: number | undefined;
ConditionDamage?: number | undefined;
ConditionDuration?: number | undefined;
CritDamage?: number | undefined;
Healing?: number | undefined;
Power?: number | undefined;
Precision?: number | undefined;
Toughness?: number | undefined;
Vitality?: number | undefined;
};
} | undefined;
} | {
id: number;
count: number;
binding: "Character";
bound_to: string;
charges?: number | undefined;
skin?: number | undefined;
dyes?: number[] | undefined;
upgrades?: number[] | undefined;
upgrade_slot_indices?: number[] | undefined;
infusions?: number[] | undefined;
stats?: {
id: number;
attributes: {
AgonyResistance?: number | undefined;
BoonDuration?: number | undefined;
ConditionDamage?: number | undefined;
ConditionDuration?: number | undefined;
CritDamage?: number | undefined;
Healing?: number | undefined;
Power?: number | undefined;
Precision?: number | undefined;
Toughness?: number | undefined;
Vitality?: number | undefined;
};
} | undefined;
} | {
id: number;
count: number;
binding: "Account";
charges?: number | undefined;
skin?: number | undefined;
dyes?: number[] | undefined;
upgrades?: number[] | undefined;
upgrade_slot_indices?: number[] | undefined;
infusions?: number[] | undefined;
stats?: {
id: number;
attributes: {
AgonyResistance?: number | undefined;
BoonDuration?: number | undefined;
ConditionDamage?: number | undefined;
ConditionDuration?: number | undefined;
CritDamage?: number | undefined;
Healing?: number | undefined;
Power?: number | undefined;
Precision?: number | undefined;
Toughness?: number | undefined;
Vitality?: number | undefined;
};
} | undefined;
} | null)[]>;
/**
* Returns the templates stored in a player's build storage.
*/
getBuildStorage(): Promise<{
name: string;
profession: string;
specializations: {
id: number;
traits: (number | null)[];
}[];
skills?: {
heal: number | null;
utilities: (number | null)[];
elite: number | null;
} | undefined;
aquatic_skills?: {
heal: number | null;
utilities: (number | null)[];
elite: number | null;
} | undefined;
legends?: (string | null)[] | undefined;
aquatic_legends?: (string | null)[] | undefined;
}[]>;
/**
* Returns information about time-gated recipes that have been crafted by the account since daily-reset.
*/
getDailyCrafts(): Promise<string[]>;
/**
* Returns the dungeons completed since daily dungeon reset.
*/
getDungeons(): Promise<string[]>;
/**
* Returns the unlocked dyes of the account.
*/
getDyes(): Promise<number[]>;
/**
* Returns the player's unlocked emotes.
*/
getEmotes(): Promise<string[]>;
/**
* Returns information about finishers that are unlocked for an account.
*/
getFinishers(): Promise<{
id: number;
permanent: boolean;
quantity?: number | undefined;
}[]>;
/**
* Returns information about gliders that are unlocked for an account.
*/
getGliders(): Promise<number[]>;
/**
* Returns information about unlocked home instance nodes.
*/
getHomeNodes(): Promise<string[]>;
/**
* Returns information about unlocked home instance cats.
*/
getHomeCats(): Promise<number[]>;
/**
* Returns information about unlocked homestead decorations.
*/
getHomesteadDecorations(): Promise<{
id: number;
count: number;
}[]>;
/**
* Returns information about glyphs stored in homestead collection boxes.
*/
getHomesteadGlyphs(): Promise<string[]>;
/**
* Returns the shared inventory slots in an account.
* If null, the slot is empty
*/
getInventory(): Promise<({
id: number;
count: number;
charges?: number | undefined;
skin?: number | undefined;
upgrades?: number[] | undefined;
infusions?: number[] | undefined;
binding?: "Account" | undefined;
} | null)[]>;
/**
* Returns the unlocked Jade Bot skins of the account.
*/
getJadebots(): Promise<number[]>;
/**
* Returns information about the Legendary Armory items that are unlocked for an account.
*/
getLegendaryArmory(): Promise<{
id: number;
count: number;
}[]>;
/**
* Returns the total amount of luck consumed on an account.
*/
getLuck(): Promise<{
id: "luck";
value: number;
}[]>;
/**
* Returns information about mail carriers that are unlocked for an account.
*/
getMailCarriers(): Promise<number[]>;
/**
* Returns information about Hero's Choice Chests acquired by the account since daily-reset.
*/
getMapChests(): Promise<string[]>;
/**
* Returns information about masteries that are unlocked for an account.
* A tallied up total of the account's mastery points can be found at /v2/account/mastery/points.
*/
getMasteries(): Promise<{
id: number;
level: number;
}[]>;
/**
* Returns information about the total amount of mastery points that are unlocked for an account.
* A detailed mastery track completion break down is available at /v2/account/masteries.
*/
getMasteryPoints(): Promise<{
totals: {
region: string;
spent: number;
earned: number;
}[];
unlocked: number[];
}>;
/**
* Returns the materials stored in a player's vault.
*/
getMaterials(): Promise<{
id: number;
category: number;
count: number;
binding?: "Account" | undefined;
}[]>;
/**
* Returns the unlocked miniatures of the account.
*/
getMinis(): Promise<number[]>;
/**
* Returns the unlocked mount skins of the account.
*/
getMountSkins(): Promise<number[]>;
/**
* Returns the unlocked mounts of the account.
*/
getMountTypes(): Promise<string[]>;
/**
* Returns information about novelties that are unlocked for an account.
*/
getNovelties(): Promise<number[]>;
/**
* Returns information about outfits that are unlocked for an account.
*/
getOutfits(): Promise<number[]>;
/**
* Returns account-wide progression for Fractals's Account Augmentation and Luck.
*/
getProgression(): Promise<{
id: string;
value: number;
}[]>;
/**
* Returns information about pvp heroes that are unlocked for an account.
*/
getPvpHeroes(): Promise<number[]>;
/**
* Returns the completed raid encounters since weekly raid reset.
*/
getRaids(): Promise<string[]>;
/**
* Returns information about recipes that are unlocked for an account.
*/
getRecipes(): Promise<number[]>;
/**
* Returns the unlocked Skiff skins of the account.
*/
getSkiffs(): Promise<number[]>;
/**
* Returns the unlocked skins of the account.
*/
getSkins(): Promise<number[]>;
/**
* Returns information about titles that are unlocked for an account.
*/
getTitles(): Promise<number[]>;
/**
* Returns the currencies of the account
*/
getWallet(): Promise<{
id: number;
value: number;
}[]>;
/**
* Returns the current set of daily Wizard's Vault achievements for the account.
*/
getWizardsVaultDaily(): Promise<{
meta_progress_current: number;
meta_progress_complete: number;
meta_reward_item_id: number;
meta_reward_astral: number;
meta_reward_claimed: boolean;
objectives: {
id: number;
title: string;
track: string;
acclaim: number;
progress_current: number;
progress_complete: number;
claimed: boolean;
}[];
}>;
/**
* Returns the current set of Wizard's Vault rewards, along with details about which have already been purchased by the account, and in what quantity.
*/
getWizardsVaultListings(): Promise<{
id: number;
item_id: number;
item_count: number;
type: "Featured" | "Normal" | "Legacy";
cost: number;
purchased?: number | undefined;
purchase_limit?: number | undefined;
}[]>;
/**
* Returns the current set of special Wizard's Vault achievements for the account.
*/
getWizardsVaultSpecial(): Promise<{
objectives: {
id: number;
title: string;
track: string;
acclaim: number;
progress_current: number;
progress_complete: number;
claimed: boolean;
}[];
}>;
/**
* Returns the current set of weekly Wizard's Vault achievements for the account.
*/
getWizardsVaultWeekly(): Promise<{
meta_progress_current: number;
meta_progress_complete: number;
meta_reward_item_id: number;
meta_reward_astral: number;
meta_reward_claimed: boolean;
objectives: {
id: number;
title: string;
track: string;
acclaim: number;
progress_current: number;
progress_complete: number;
claimed: boolean;
}[];
}>;
/**
* Returns information about which world bosses have been killed by the account since daily-reset.
*/
getWorldBosses(): Promise<string[]>;
/**
* Returns information about an account's allocated wvw guild, and identifies the matchmaking team.
*/
getWvW(): Promise<{
team: number;
guild: string;
}>;
}