enkaNetwork
Node JS/TypeScript module that allows you to work with the site enka.network adding localization and convenience.
📦
Download
- используя
npm
npm i enkanetwork
- используя
Yarn
yarn add enkanetwork
🛠️
Usage
const { enkaNetwork } = require("enkanetwork"); //import { enkaNetwork } from "enkanetwork";
const enka = new enkaNetwork({language: "EN"});
Key | In API | Type | Description | Required? |
---|---|---|---|---|
language | - | number | The language to be used in the localization of names (characters, artifacts, etc.). Default is «EN» | - |
const user = await enka.fetchUser(700832641);
Key | In API | Type | Description | Required? |
---|---|---|---|---|
UID | - | number | UID from the game |
+ |
⚙
Response structure
FetchUser
Key | In API | Type | Description |
---|---|---|---|
player | playerInfo | object | See Player |
characters | avatarInfoList | array | See Characters |
ttl | ttl | number | Cache lifetime in milliseconds |
Player
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 |
NameCard
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 |
CharacterPreview
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 |
ProfilePicture
Key | In API | Type | Description |
---|---|---|---|
id | avatarId | number | Character id |
name | - | string | Localized character name |
icon | - | string | URL to get the character icon |
Characters
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 |
Icons
Key | In API | Type | Description |
---|---|---|---|
avatar | - | string | Character avatar icon |
side | - | string | Character side avatar icon |
ElementType
Key | In API |
---|---|
Cryo | Ice |
Hydro | Water |
Anemo | Wind |
Pyro | Fire |
Geo | Rock |
Electro | Electric |
CharacterConstellation
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? |
CharacterSkill
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 |
CharacterWeapon
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 |
CharacterReluquary
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 |
ReliquaryType
Key | In API |
---|---|
Flower | EQUIP_BRACER |
Feather | EQUIP_NECKLACE |
Sands | EQUIP_SHOES |
Goblet | EQUIP_RING |
Circlet | EQUIP_DRESS |
For assets thanks enkanetwork.py-data