enka-network-api
Version:
Enka-network API wrapper for Genshin Impact.
33 lines (32 loc) • 1.41 kB
TypeScript
import { EnkaClient } from "../../client/EnkaClient";
import { ImageAssets } from "../assets/ImageAssets";
import { TextAssets } from "../assets/TextAssets";
import { LanguageCode } from "../../client/CachedAssetsManager";
import { ExcelJsonObject } from "../../client/ExcelTransformer";
export interface Birthday {
month: number;
day: number;
}
export type VoiceLanguage = "chinese" | "japanese" | "english" | "korean";
export type CharacterVoiceActors = Record<VoiceLanguage, TextAssets>;
export declare class CharacterDetails {
readonly enka: EnkaClient;
readonly id: number;
readonly characterId: number;
/** If the character is Traveler, this will be null */
readonly birthday: Birthday | null;
readonly location: TextAssets;
readonly vision: TextAssets;
readonly constellation: TextAssets;
readonly constellationIcon: ImageAssets;
/** Travelers do not have this */
readonly title: TextAssets;
readonly description: TextAssets;
readonly cv: CharacterVoiceActors;
readonly _data: ExcelJsonObject;
readonly _nameId: string;
constructor(data: ExcelJsonObject, isArchon: boolean, enka: EnkaClient);
getCvByLanguage(lang: LanguageCode): TextAssets;
static getById(id: number, isArchon: boolean, enka: EnkaClient): CharacterDetails;
static getByCharacterId(id: number, isArchon: boolean, enka: EnkaClient): CharacterDetails;
}