Node JS/TypeScript module that allows you to work with the site API enka.network adding localization and convenience (even caching).
- используя
npm
- используя
Yarn
import { EnkaNetwork } from "enkanetwork"; //const { EnkaNetwork } = require("enkanetwork");
const enka = new EnkaNetwork({ language: "EN", caching: true });
Key |
In API |
Type |
Description |
Required? |
language |
- |
number |
The language to be used in the localization of names (characters, artifacts, etc.). Default is «EN » |
- |
caching |
- |
boolean |
Cache responses? Default is true |
- |
userAgent |
- |
string or boolean |
Disable or change the header User-Agent . (false for disable) |
- |
const user = await enka.fetchUser(700832641, "RU");
Key |
In API |
Type |
Description |
Required? |
UID |
- |
number |
UID from the game |
+ |
language |
- |
number |
The language to be used in the localization of names (characters, artifacts, etc.). Default is EnkaNetwork.language |
- |
const user = await enka.fetchProfile("kaito", "RU");
Key |
In API |
Type |
Description |
Required? |
Profile tag |
- |
number |
Enka patreon profile tag from the site EnkaNetwork |
+ |
language |
- |
number |
The language to be used in the localization of names (characters, artifacts, etc.). Default is EnkaNetwork.language |
- |
Key |
In API |
Type |
Description |
player |
playerInfo |
object |
See Player |
characters |
avatarInfoList |
array |
See Characters |
ttl |
ttl |
number |
Cache lifetime in milliseconds |
Key |
In API |
Type |
Description |
profile |
profile |
boolean |
User fetched by profile tag? |
accounts |
hoyos |
array |
See Accounts |
enkaProfile |
user |
object |
See EnkaProfile |
Key |
In API |
Type |
Description |
-------- |
----- |
array |
See Accounts. Response is array. |
Key |
In API |
Type |
Description |
is_uid_public |
is_uid_public |
boolean |
User uid is public? |
player |
player_info |
object |
See Player |
Key |
In API |
Type |
Description |
id |
id |
string |
Enka profile id |
username |
profile.username |
string |
Enka profile username |
bio |
profile.bio |
string |
Enka profile description |
level |
profile.level |
number |
Enka profile level |
drawName |
profile.draw_name |
booolean |
Enka profile draw name? |
drawUid |
profile.draw_uid |
booolean |
Enka profile draw uid? |
signupState |
profile.signup_state |
integer |
Enka profile sign up state |
imageUrl |
profile.image_url |
string |
Url of enka profile picture |
Key |
In API |
Type |
Description |
nickname |
nickname |
string |
Profile nickname |
signature |
signature |
string |
Profile description |
level |
level |
number |
User rank level |
worldLevel |
worldLevel |
number |
User world level |
nameCard |
- |
object |
See NameCard |
achievements |
finishAchievementNum |
number |
Achievements count |
abyssFloor |
towerFloorIndex |
number |
The floor of the abyss passed by the player |
abyssLevel |
towerLevelIndex |
number |
The hall of the abyss floor passed by the player |
charactersPreview |
showAvatarInfoList |
array |
See CharacterPreview |
nameCardsPreview |
showNameCardIdList |
array |
See NameCard |
profilePicture |
profilePicture |
object |
See ProfilePicture |
Key |
In API |
Type |
Description |
id |
nameCardId |
number |
Namecard id |
name |
- |
string |
Localized namecard name |
icon |
- |
string |
URL to get the icon |
banner |
- |
string |
URL to get the icon banner |
navbar |
- |
string |
URL to get the icon navbar |
Key |
In API |
Type |
Description |
id |
avatarId |
number |
Character id |
name |
- |
string |
Localized character name |
icon |
- |
string |
URL to get the character icon |
level |
level |
number |
Character level |
Key |
In API |
Type |
Description |
id |
avatarId |
number |
Character id |
name |
- |
string |
Localized character name |
icon |
- |
string |
URL to get the character icon |
Key |
In API |
Type |
Description |
id |
avatarId |
number |
Character id |
name |
- |
string |
Localized character name |
icons |
- |
object |
See Icons |
rarity |
- |
number |
Character rarity (5 or 4) |
element |
- |
string |
See ElementType |
level |
propMap["4001"] |
number |
Character level |
elevations |
propMap["1002"] |
number |
Character elevations |
xp |
propMap["1001"] |
number |
Character expiriance |
constellation |
talents |
array |
See CharacterConstellation |
skills |
skills |
array |
See CharacterSkill |
skillSetId |
skillDepotId |
number |
Character Skill Set ID |
skillData |
inherentProudSkillList |
array |
List of Unlocked Skill Ids |
stats |
fightPropMap |
array |
Character stats |
weapon |
equipList |
number |
See CharacterWeapon |
reluquary |
equipList |
number |
See ProfilePicture |
Key |
In API |
Type |
Description |
avatar |
- |
string |
Character avatar icon |
side |
- |
string |
Character side avatar icon |
Key |
In API |
Cryo |
Ice |
Hydro |
Water |
Anemo |
Wind |
Pyro |
Fire |
Geo |
Rock |
Electro |
Electric |
Key |
In API |
Type |
Description |
id |
talent |
number |
Character constellation id |
name |
- |
string |
Character constellation name |
icon |
- |
string |
URL to get the character constellation icon |
unlocked |
- |
boolean |
Character constellation unlocked? |
Key |
In API |
Type |
Description |
id |
skill |
number |
Character skill id |
name |
- |
string |
Character skill name |
icon |
- |
string |
URL to get the character skill icon |
level |
level |
number |
Character skill level |
Key |
In API |
Type |
Description |
id |
itemId |
number |
Character weapon id |
name |
- |
string |
Character weapon name |
icon |
- |
string |
URL to get the character weapon icon |
level |
level |
number |
Character weapon level |
elevations |
weapon.promoteLevel |
number |
Character weapon elevations |
improvement |
weapon.affixMap |
number |
Character weapon improvement |
rarity |
flat.rankLevel |
number |
Character weapon rarity |
mainStat |
flat.weaponStats[0] |
object |
Character weapon main stat |
subStat |
flat.weaponStats[1] |
object |
Character weapon sub stat |
Key |
In API |
Type |
Description |
id |
itemId |
number |
Character reluquary id |
name |
- |
string |
Character reluquary name |
setName |
- |
string |
Character reluquary set name |
icon |
- |
string |
URL to get the character reluquary icon |
type |
- |
string |
See ReliquaryType |
level |
reliquary.level |
number |
Character reluquary level |
rarity |
flat.rankLevel |
number |
Character reluquary rarity |
mainStat |
flat.reliquaryMainstat |
object |
Character reluquary main stat |
subStat |
flat.reliquarySubstats |
object |
Character reluquary sub stat |
Key |
In API |
Flower |
EQUIP_BRACER |
Feather |
EQUIP_NECKLACE |
Sands |
EQUIP_SHOES |
Goblet |
EQUIP_RING |
Circlet |
EQUIP_DRESS |
For assets thanks enkanetwork.py-data