Node JS/TypeScript module that allows you to work with the site enka.network adding localization and convenience.

Overview

enkaNetwork

Node JS/TypeScript module that allows you to work with the site enka.network adding localization and convenience.

enkaNetwork

Downloads Downloads/month last commit GitHub npm

📦 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

You might also like...

Basic website that allows users to add/remove books from a list. Achieved using JavaScript objects and arrays, dynamically modifying the DOM and adding basic events.

Awesome Books Basic website that allows users to add/remove books from a list. Achieved using JavaScript objects and arrays, dynamically modifying the

Dec 20, 2022

An online library for adding and removing a different number of books from a user collection, keeping track of the books you've read and the one's you are yet to read

An online library for adding and removing a different number of books from a user collection, keeping track of the books you've read and the one's you are yet to read

Awesmoe Books A Website demo for our project of book store, The website has ability of adding and removing you books from yor library, Thats reflects

Jul 8, 2022

Microverse Module 02 Project: This is educational project is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as complete. Built with HTML, Sass, JavaScript and Webpack.

Project Demo Live Demo Description To-do list is a tool that helps to organize your day. It simply lists the things that you need to do and allows you

Oct 21, 2022

The node module that allows you to control your Ethereum revocation lists & resolve revocation keys.

The node module that allows you to control your Ethereum revocation lists & resolve revocation keys.

Ethereum Revocation Registry Controller The controller module for interacting with EIP-5539-compatible Ethereum revocation lists. Motivation The EIP-5

Sep 27, 2022

An Obsidian plugin that allows adding iframes with custom styling as editor tabs. Also comes with presets for Google Keep and more.

An Obsidian plugin that allows adding iframes with custom styling as editor tabs. Also comes with presets for Google Keep and more.

Obsidian Custom Frames An Obsidian plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep an

Jan 8, 2023

A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview 📝 It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Apr 22, 2022

A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview 📝 It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Apr 22, 2022

Userland module that implements the module path mapping that Node.js does with "exports" in package.json

exports-map Userland module that implements the module path mapping that Node.js does with "exports" in package.json npm install exports-map Usage co

May 31, 2022

Node 18's node:test, as a node module

node-core-test This is a user-land port of node:test, the experimental test runner introduced in Node.js 18. This module makes it available in Node.js

Dec 15, 2022
Comments
  • TypeError: Cannot read properties of undefined (reading 'map')

    TypeError: Cannot read properties of undefined (reading 'map')

    i noticed that when fetching a user (especially using a begineers namecard (Genshin Impact: A New World) an error occurs (see attached picture).

    const userEnka = await enka.fetchUser(uid);

    how long does the module update? because when i change something information in the game, when i try to console.log(userEnka) there's nothing change with the information.

    image

    opened by kadistudio 2
  • [email protected](Dec 7, 2022)

  • [email protected](Nov 10, 2022)

    Release 1.1.6

    • Added a key userAgent that can change or remove User-Agent header.

    Example usage to remove: (this fixes the issue #4, thank you for finding it, @ERIS-VN)

    const enka = new EnkaNetwork({ language: "RU", userAgent: false });
    

    Example usage to set your own value:

    const enka = new EnkaNetwork({ language: "RU", userAgent: "ERIS-VN Project" });
    

    Full Changelog: https://github.com/kravetsone/enkaNetwork/compare/[email protected]@1.1.6

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Nov 8, 2022)

    Release 1.1.5

    • FIxed Issue #3 when you request data for empty accounts, it could contain an error. At the moment, this is taken into account and will not cause errors. Thank you again @kadistudio image

    Full Changelog: https://github.com/kravetsone/enkaNetwork/compare/[email protected]@1.1.5

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Nov 6, 2022)

    Release 1.1.3

    • Added new 3.2 game data. Sorry it's so late
    • FIxed Issue #2 when the user received the same picture banner and navbar for namecard. Thank you @kadistudio

    Full Changelog: https://github.com/kravetsone/enkaNetwork/compare/[email protected]@1.1.3

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Oct 8, 2022)

    Release 1.1.1

    • Added support caching in fetchUser method around response ttl
    • Added key caching in EnkaNetwork class
    import { EnkaNetwork } from "enkanetwork"; //const { EnkaNetwork } = require("enkanetwork");
    const enka = new EnkaNetwork({ language: "EN", caching: false }); //responses will not be cached
    
    • Moved fetch profile in fetchUser to a separate method fetchProfile
    const user = await enka.fetchProfile("kaito", "RU");
    
    • Swapped import and require in ReadMe
    import { EnkaNetwork } from "enkanetwork"; //const { EnkaNetwork } = require("enkanetwork");
    
    • and refactored code...

    Full Changelog: https://github.com/kravetsone/enkaNetwork/compare/[email protected]@1.1.1

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Oct 5, 2022)

    Release 1.1.0

    • Fixed classes starting with a lowercase letter
    const { EnkaNetwork } = require("enkanetwork"); //import { EnkaNetwork } from "enkanetwork";
    const enka = new EnkaNetwork({ language: "EN" });
    
    • Refactored code
    • Added key language in fetchUser method
    const user = await enka.fetchUser(700832641, "RU");
    
    • Added support for enka profile
    const user = await enka.fetchUser("kaito", "RU");
    
    const accounts = await enka.fetchAccounts("kaito", "RU");
    

    Full Changelog: https://github.com/kravetsone/enkaNetwork/compare/[email protected]@1.1.0

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Sep 28, 2022)

  • [email protected](Sep 17, 2022)

Owner
kravets
kravets
1kb js library contains development debugging, error monitoring and reporting, user problem localization features

1kb js library contains development debugging, error monitoring and reporting, user problem localization features

腾讯 AlloyTeam 1.4k Dec 22, 2022
A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Jakub Neander 69 Dec 12, 2022
Simple but Complete & Fast network monitor for your home network

netmon Netmon is an opensource project for protecting and monitoring your home network. Netmon is written to run on a Raspberry PI and is optimized to

Tommaso Ventafridda 9 Jul 6, 2022
Cindy Dorantes 12 Oct 18, 2022
A JavaScript Library To Make Your Work Work Easier/Faster

Functionalty.js (beta) About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project Cr

Ali-Eldeba 16 Aug 30, 2022
A JavaScript Library To Make Your Work Work Easier/Faster

Functionality.js (beta) About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project C

Ali-Eldeba 9 May 25, 2022
A JavaScript Library To Make Your Work Work Easier/Faster

Functionality.js About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project Created

functionality 16 Jun 23, 2022
A vanilla-js module for adding zoom-on-wheel and pan-on-drag behavior to inline SVG elements.

svg-pan-zoom-container A vanilla-js module for adding zoom-on-wheel and pan-on-drag behavior to inline SVG elements. No need to write scripts. Just ma

31 Dec 10, 2022
An interactive app that allows adding, editing and removing tasks of a to-do list. Drag-and-drop featured added. Webpack was used to bundle all the Js modules in to one main Js file.

To-do List A to-do list app This app let you to set your own to-do list. Built With HTML CSS JavaScript WebPack Jest Live Page Page Link Getting Start

Kenny Salazar 7 May 5, 2022