1️⃣Simple usage
import { EnkaNetwork } from "enkanetwork";
const enka = new EnkaNetwork();
await enka.assetsUpdater.fetchAssets();
const user = await enka.fetchUser(618285856);
console.log(`${user.player.nickname}'s profile info:\n`);
console.log(`signature: ${user.player.signature}`);
console.log(
`on profile picture: ${user.player.profilePicture.name} (${user.player.profilePicture.icon})`
);
console.log(
`namecard name: ${user.player.nameCard.name} (${user.player.nameCard.icon})`
);
console.log(`world level: ${user.player.worldLevel}`);
console.log(`achievements count: ${user.player.achievements}`);
console.log(`\n${user.player.nickname}'s characters list:\n`);
user.characters.forEach((character) => {
console.log(
`${character.name} (${character.rarity} ⭐) - ${character.level} level`
);
});
Last updated