๐Ÿ“ฆQuick Start | Installation

โš™๏ธ Installation

When installing the module, the necessary assets of the current version of the game are automatically loaded. You can also specify the languages for which to download localization.

Full list of supported languages - EN, RU, CHS, CHT, DE, ES, FR, ID, JP, KR, PT, TH, VI

They should be listed through ยซ,ยป (without a space). If you do not specify them, then English will be downloaded. For example - npm i enkanetwork --languages=EN,RU

npm i enkanetwork --languages=EN

โญ Usage

We have installed the library. Now it's time to start writing the simplest example in CommonJS style.

  1. Create a file in the folder of our project which we will call ยซindex.jsยป or ยซindex.mjsยป for ECMAScript style

  2. Import the library and create an instance of the class

  3. ES import style
    import { EnkaNetwork } from "enkanetwork";
    
    const enka = new EnkaNetwork();
  4. or in CommonJS

    CommonJS style
    const { EnkaNetwork } = require("enkanetwork");
    
    const enka = new EnkaNetwork();
  5. We receive data for an account with uid 618285856 and console.log it

  6. enka.fetchUser(618285856).then(console.log);

๐Ÿ“– Full example

import { EnkaNetwork } from "enkanetwork";

const enka = new EnkaNetwork();

enka.fetchUser(618285856).then(console.log);

Last updated