👤fetchUser

async function to fetch user data by uid from the Genshin Impact along with its characters and their profile information.

Params

  • uid: number - UID from the game.

  • 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.fetchUser(700832641).then(console.log); // with uid
enka.fetchUser(700832641, "RU").then(console.log); // with uid and language for localization 

Return

pageFetchUserUID

Last updated