enkaNetwork
GitHubNPM
  • ✨Overview
  • 📦Quick Start | Installation
  • 🖇️TypeScript usage
  • ⚙️Class description
    • 📝EnkaNetwork
    • 💾AssetsUpdater
    • 🔎AssetsFinder
  • 🔗Methods
    • 👤fetchUser
    • 🕵️fetchProfileInfo
    • 🌟fetchEnkaProfile
    • 📕fetchEnkaHoyos
    • 🔹fetchEnkaHoyo
    • 🟣fetchEnkaHoyoBuilds
    • 🚩setLanguage
  • 🎓Models
    • EnkaProfile
    • Character
      • Character
      • CharacterConstellation
      • CharacterReliquary
      • CharacterSkill
      • CharacterStats
      • CharacterWeapon
    • PlayerInfo
      • CharacterPreview
      • Namecard
      • PlayerInfo
      • ProfilePicture
    • Fetcher
      • FetchEnkaHoyosBuilds
      • FetchEnkaHoyo
      • FetchEnkaProfile
      • FetchUserUID
      • FetchProfileInfo
  • ✏️Examples
    • 1️⃣Simple usage
    • 2️⃣Express API
    • 3️⃣Fastify API
    • 4️⃣Telegram bot
Powered by GitBook
On this page
  • Params
  • Example
  • Return

Was this helpful?

  1. Methods

fetchUser

PreviousAssetsFinderNextfetchProfileInfo

Last updated 1 year ago

Was this helpful?

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

🔗
👤
FetchUserUID