Skip to main content

EnkaProfile

class EnkaProfile

The Enka.Network account

constructor

new EnkaProfile(data, enka)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
dataJsonObject
enkaEnkaClient

Properties

enka

Type: EnkaClient


username

Type: string


bio

Type: string


avatar

Type: string | null


imageUrl

Type: string | null


level

Type: number


signupState

Type: number


url

Type: string


Methods

fetchAllEnkaUsers

async

Returns: Promise<EnkaUser[]>

  • the all game accounts added to the Enka.Network account

fetchGenshinEnkaUsers

async

Returns: Promise<EnkaUser[]>

  • the genshin accounts added to the Enka.Network account

fetchStarRailEnkaUsers

async

Returns: Promise<EnkaUser[]>

  • the starrail accounts added to the Enka.Network account

fetchEnkaUserBuilds

async

Returns: Promise<{[characterId: string]: (GenshinCharacterBuild | TSUnknownKeyword)[]}>

  • the character builds including saved builds in Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
hashstringEnkaUser hash

fetchGenshinBuilds

async

Returns: Promise<{[characterId: string]: GenshinCharacterBuild[]}>

  • the genshin character builds including saved builds in Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
hashstringEnkaUser hash

fetchStarRailBuilds

async

This requires enka with starrailClient.
And the starrailClient option in EnkaClientOptions must be
an instance of StarRail from starrail.js.

Returns: Promise<{[characterId: string]: TSUnknownKeyword[]}>

  • the starrail character builds including saved builds in Enka.Network account
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
hashstringEnkaUser hash