EnkaClient
Implements
- unknown<GenshinUser, GenshinCharacterBuild>
Index
Constructors
Properties
Methods
- _fetchUser
- close
- fetchCollapsedUser
- fetchEnkaGenshinAccount
- fetchEnkaGenshinAccounts
- fetchEnkaGenshinBuilds
- fetchUser
- getAllArtifactSets
- getAllArtifacts
- getAllCharacters
- getAllCostumes
- getAllMaterials
- getAllNameCards
- getAllWeapons
- getArtifactById
- getArtifactSetById
- getCharacterBuild
- getCharacterById
- getCostumeById
- getMaterialById
- getNameCardById
- getUser
- getWeaponById
Constructors
constructor
Parameters
options: Partial<EnkaClientOptions> = {}
Returns EnkaClient
Properties
readonlycachedAssetsManager
The genshin cache data manager of the client
readonlyhoyoType
readonlyoptions
The options the client was instantiated with
Methods
_fetchUser
Type parameters
- T: boolean
Parameters
uid: string | number
In-game UID of the user
collapse: T
Whether to fetch rough user information (Very fast)
Returns Promise<T extends true ? GenshinUser : DetailedGenshinUser>
DetailedGenshinUser if collapse is false, GenshinUser if collapse is true
close
Clear all running tasks in the client.
Returns void
fetchCollapsedUser
Parameters
uid: string | number
In-game UID of the user
Returns Promise<GenshinUser>
fetchEnkaGenshinAccount
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
Parameters
username: string
enka.network username, not in-game nickname
Returns Promise<EnkaGameAccount<EnkaClient>[]>
the genshin accounts added to the Enka.Network account
fetchEnkaGenshinBuilds
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
Parameters
uid: string | number
In-game UID of the user
Returns Promise<DetailedGenshinUser>
getAllArtifactSets
Returns ArtifactSet[]
all artifact set data
getAllArtifacts
Parameters
highestRarityOnly: boolean = false
Whether to return only the rarest of artifacts of the same type
Returns ArtifactData[]
all artifact data
getAllCharacters
Returns CharacterData[]
all playable character data
getAllCostumes
Parameters
includeDefaults: boolean = false
Whether to include default costumes
Returns Costume[]
all costume data
getAllMaterials
Returns Material[]
all material data
getAllNameCards
Returns NameCard[]
all name card data
getAllWeapons
Parameters
excludeInvalidWeapons: boolean = true
filterByCodex: 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
Parameters
data: JsonObject
username: string
hash: string
Returns GenshinCharacterBuild
getCharacterById
Parameters
id: string | number
The id of the character
optionalskillDepotId: string | number
Specifies one or zero elements for Traveler
Returns CharacterData
getCostumeById
Parameters
id: string | number
The id of the costume
Returns Costume
getMaterialById
Parameters
id: string | number
The id of the material
Returns Material
getNameCardById
Parameters
id: string | number
The id of the name card
Returns NameCard
getUser
Parameters
data: JsonObject
Returns GenshinUser
getWeaponById
Parameters
id: string | number
The id of the weapon
Returns WeaponData
Options for the client