UNPKG

@blizzard-api/wow

Version:

A series of helpers to interact with the World of Warcraft Blizzard API

85 lines (84 loc) 3.2 kB
import { Faction, Gender, Href, NameIdKey, Realm, Resource, ResponseBase } from "@blizzard-api/core"; //#region src/character-profile/types.d.ts interface CharacterProfileStatusResponse extends ResponseBase { id: number; is_valid: boolean; } interface CharacterProfileSummaryResponse extends ResponseBase { achievement_points: number; achievements: Href; achievements_statistics: Href; active_spec: NameIdKey; active_title?: NameIdKey & { display_string: string; }; appearance: Href; average_item_level: number; character_class: NameIdKey; collections: Href; covenant_progress: CovenantProgress; encounters: Href; equipment: Href; equipped_item_level: number; experience: number; faction: Faction; gender: Gender; guild?: Guild; houses?: Array<Href>; hunter_pets: Href; id: number; is_remix: boolean; last_login_timestamp: number; level: number; media: Href; mythic_keystone_profile: Href; name: string; name_search: string; professions: Href; pvp_summary: Href; quests: Href; race: NameIdKey; realm: Realm; reputations: Href; specializations: Href; statistics: Href; titles: Href; } interface CovenantProgress { chosen_covenant: NameIdKey; renown_level: number; soulbinds: Href; } interface Guild extends NameIdKey { faction: Faction; realm: Realm; } //#endregion //#region src/character-profile/index.d.ts /** * Returns the status and a unique ID for a character. A client should delete information about a character from their application if any of the following conditions occur: * - an HTTP 404 Not Found error is returned * - the is_valid value is false * - the returned character ID doesn't match the previously recorded value for the character * * The following example illustrates how to use this endpoint: * * 1. A client requests and stores information about a character, including its unique character ID and the timestamp of the request. * 2. After 30 days, the client makes a request to the status endpoint to verify if the character information is still valid. * 3. If character cannot be found, is not valid, or the characters IDs do not match, the client removes the information from their application. * 4. If the character is valid and the character IDs match, the client retains the data for another 30 days. * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. * @returns the status of the character profile for a character. */ declare function characterProfileStatus(realmSlug: string, characterName: string): Resource<CharacterProfileStatusResponse>; /** * Returns a summary of the character profile for a character. * @param realmSlug The slug of the realm. * @param characterName The lowercase name of the character. * @returns a summary of the character profile for a character. */ declare function characterProfileSummary(realmSlug: string, characterName: string): Resource<CharacterProfileSummaryResponse>; //#endregion export { CharacterProfileSummaryResponse as i, characterProfileSummary as n, CharacterProfileStatusResponse as r, characterProfileStatus as t }; //# sourceMappingURL=index-Dz1ROyfl.d.ts.map