Skip to main content

EnkaSystem

class EnkaSystem

constructor

new EnkaSystem(options)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
optionsPartial<EnkaSystemOptions>✔️{}

Properties

instance

static

Default EnkaSystem instance.

Type: EnkaSystem


enkaUrl

static

Type: string


Methods

registerLibrary

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
libraryEnkaLibrary<User, CharacterBuild>

getLibrary

Returns: EnkaLibrary<User, CharacterBuild> | undefined

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
hoyoTypeHoyoType

fetchEnkaProfile

async

Returns: Promise<EnkaProfile>

  • the Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
usernamestringenka.network username, not in-game nickname

fetchEnkaGameAccounts

async

Returns: Promise<EnkaGameAccount<EnkaLibrary<User, CharacterBuild>>[]>

  • the all game accounts added to the Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
usernamestringenka.network username, not in-game nickname
allowedHoyoTypesHoyoType[] | undefined✔️undefinedhoyoTypes to filter

fetchEnkaGameAccount

async

Returns: Promise<EnkaGameAccount<T>>

  • the game account added to the Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
usernamestringenka.network username, not in-game nickname
hashstringthe game account hash

fetchEnkaCharacterBuilds

async

Returns: Promise<{[characterId: string]: ExtractBuildType<T>[]}>

  • the game character builds including saved builds in the Enka.Network game account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
usernamestringenka.network username, not in-game nickname
hashstringthe game account hash