@blizzard-api/wow
Version:
A series of helpers to interact with the World of Warcraft Blizzard API
117 lines (116 loc) • 3.66 kB
TypeScript
import { KeyBase, MediaAsset, NameId, NameIdKey, NullishNameIdKey, Resource, ResponseBase } from "@blizzard-api/core";
//#region src/pet/types.d.ts
/**
* The response for a pet ability index.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetAbilityIndexResponse extends ResponseBase {
abilities: Array<NullishNameIdKey>;
}
/**
* The response for a pet ability media.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetAbilityMediaResponse extends ResponseBase {
assets: Array<MediaAsset>;
id: number;
}
/**
* The response for a pet ability.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetAbilityResponse extends NameId, ResponseBase {
battle_pet_type: BattlePetType;
cooldown?: number;
media: Media;
rounds: number;
}
/**
* The response for a pet index.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetIndexResponse extends ResponseBase {
pets: Array<NullishNameIdKey>;
}
/**
* The response for a pet search.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetMediaResponse extends ResponseBase {
assets: Array<MediaAsset>;
id: number;
}
/**
* The response for a pet.
* @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
*/
interface PetResponse extends NameId, ResponseBase {
abilities?: Array<Ability>;
battle_pet_type: BattlePetType;
creature: NameIdKey;
description: null | string;
icon: string;
is_alliance_only: boolean;
is_battlepet: boolean;
is_capturable: boolean;
is_horde_only: boolean;
is_random_creature_display: boolean;
is_tradable: boolean;
media: Media;
should_exclude_if_uncollected?: boolean;
source?: Source;
}
interface Ability {
ability: NameIdKey;
required_level: number;
slot: number;
}
interface BattlePetType extends NameId {
type: string;
}
interface Media extends KeyBase {
id: number;
}
interface Source {
name: string;
type: string;
}
//#endregion
//#region src/pet/index.d.ts
/**
* Get a pet by ID.
* @param petId The pet ID.
* @returns The pet. See {@link PetResponse}.
*/
declare function pet(petId: number): Resource<PetResponse>;
/**
* Get a pet ability by ID.
* @param petAbilityId The pet ability ID.
* @returns The pet ability. See {@link PetAbilityResponse}.
*/
declare function petAbility(petAbilityId: number): Resource<PetAbilityResponse>;
/**
* Get a pet ability index.
* @returns The pet ability index. See {@link PetAbilityIndexResponse}.
*/
declare function petAbilityIndex(): Resource<PetAbilityIndexResponse>;
/**
* Get a pet ability media by ID.
* @param petAbilityId The pet ability ID.
* @returns The pet ability media. See {@link PetAbilityMediaResponse}.
*/
declare function petAbilityMedia(petAbilityId: number): Resource<PetAbilityMediaResponse>;
/**
* Get a pet index.
* @returns The pet index. See {@link PetIndexResponse}.
*/
declare function petIndex(): Resource<PetIndexResponse>;
/**
* Get a pet media by ID.
* @param petId The pet ID.
* @returns The pet media. See {@link PetMediaResponse}.
*/
declare function petMedia(petId: number): Resource<PetMediaResponse>;
//#endregion
export { petIndex as a, PetAbilityMediaResponse as c, PetMediaResponse as d, PetResponse as f, petAbilityMedia as i, PetAbilityResponse as l, petAbility as n, petMedia as o, petAbilityIndex as r, PetAbilityIndexResponse as s, pet as t, PetIndexResponse as u };
//# sourceMappingURL=index-BIrIv_Mr2.d.ts.map