🔹fetchEnkaHoyo

async function to fetch enkaProfile account by username and account hash from the site.

Params

  • username: string - enka.network profile username.

  • hash: string - account hash from the account.

  • language?: "CHS" | "CHT" | "DE" | "EN" | "ES" | "FR" | "ID" | "JP" | "KR" | "PT" | "RU" | "TH" | "VI" (not required) - the language to be used in the localization of names (characters, artifacts, etc.). Default is language selected in the class.

Example

import { EnkaNetwork } from "enkanetwork";

const enka = new EnkaNetwork({ language: "EN", assets: { languages: ["RU"] } });

enka.fetchEnkaHoyo("Algoinde", "4Wjv2e").then(console.log); // with enka.network profile username and hash
enka.fetchEnkaHoyo("Algoinde", "4Wjv2e", "RU").then(console.log); // with enka.network profile username, hash and language for localization

Return

FetchEnkaHoyo

Last updated