Skip to main content

EnkaClient

Implements

Index

Constructors

constructor

Properties

readonlycachedAssetsManager

cachedAssetsManager: CachedAssetsManager

The genshin cache data manager of the client

readonlyhoyoType

hoyoType: 0

readonlyoptions

The options the client was instantiated with

Methods

close

  • close(): void
  • Clear all running tasks in the client.


    Returns void

fetchEnkaGenshinAccount

  • fetchEnkaGenshinAccount(username: string, hash: string): Promise<EnkaGameAccount<EnkaClient>>

  • Parameters

    • username: string

      enka.network username, not in-game nickname

    • hash: string

      EnkaGameAccount hash

    Returns Promise<EnkaGameAccount<EnkaClient>>

    the genshin account with provided hash

fetchEnkaGenshinAccounts

  • fetchEnkaGenshinAccounts(username: string): Promise<EnkaGameAccount<EnkaClient>[]>

  • Parameters

    • username: string

      enka.network username, not in-game nickname

    Returns Promise<EnkaGameAccount<EnkaClient>[]>

    the genshin accounts added to the Enka.Network account

fetchEnkaGenshinBuilds

  • fetchEnkaGenshinBuilds(username: string, hash: string): Promise<{}>

  • Parameters

    • username: string

      enka.network username, not in-game nickname

    • hash: string

      EnkaGameAccount hash

    Returns Promise<{}>

    the genshin character builds including saved builds in Enka.Network account

fetchUser

  • @throws

    Parameters

    • uid: string | number

      In-game UID of the user

    • collapse: boolean = false

      Whether to fetch rough user information (Very fast)

    Returns Promise<GenshinUser | DetailedGenshinUser>

    DetailedGenshinUser if collapse is false, GenshinUser if collapse is true

getAllArtifactSets

getAllArtifacts

  • getAllArtifacts(highestRarityOnly?: boolean): ArtifactData[]

  • Parameters

    • highestRarityOnly: boolean = false

      Whether to return only the rarest of artifacts of the same type

    Returns ArtifactData[]

    all artifact data

getAllCharacters

getAllCostumes

  • getAllCostumes(includeDefaults?: boolean): Costume[]

  • Parameters

    • includeDefaults: boolean = false

      Whether to include default costumes

    Returns Costume[]

    all costume data

getAllMaterials

getAllNameCards

getAllWeapons

  • getAllWeapons(excludeInvalidWeapons?: boolean): WeaponData[]

  • Parameters

    • excludeInvalidWeapons: boolean = true

    Returns WeaponData[]

    all weapon data

getArtifactById

  • Parameters

    • id: string | number

      The id of the artifact

    Returns ArtifactData

getArtifactSetById

  • Parameters

    • id: string | number

      The id of artifact set

    Returns ArtifactSet

getCharacterBuild

getCharacterById

  • getCharacterById(id: string | number, skillDepotId?: string | number): CharacterData
  • Parameters

    • id: string | number

      The id of the character

    • optionalskillDepotId: string | number

      Specifies one or zero elements for Traveler

    Returns CharacterData

getCostumeById

  • getCostumeById(id: string | number): Costume
  • Parameters

    • id: string | number

      The id of the costume

    Returns Costume

getMaterialById

  • getMaterialById(id: string | number): Material
  • Parameters

    • id: string | number

      The id of the material

    Returns Material

getNameCardById

  • getNameCardById(id: string | number): NameCard
  • Parameters

    • id: string | number

      The id of the name card

    Returns NameCard

getUser

getWeaponById

  • Parameters

    • id: string | number

      The id of the weapon

    Returns WeaponData