📝EnkaNetwork
EnkaNetwork
- the class in which all interaction with enka.network takes place
const enka = new EnkaNetwork();
In the example on the last page, we used this class without parameters. Let's figure out what parameters it takes
language
language
The language to be used in the localization of names (characters, artifacts, etc.). Default is «EN
»
Full list of supported languages - EN, RU, CHS, CHT, DE, ES, FR, ID, JP, KR, PT, TH, VI
const enka = new EnkaNetwork({ language: "EN" });

caching
caching
The value of this parameter is to enable caching of responses. The default value is «true
»
false
- to disable caching
const enka = new EnkaNetwork({ caching: false });
userAgent
In paragraph 3, the enka.network API documentation states that using custom userAgent is a good practice. Default is «enkanetwork@version
»
false
- to disable userAgent in requests
const enka = new EnkaNetwork({ userAgent: false });
string
- to set a custom UserAgent in requests
const enka = new EnkaNetwork({ userAgent: "myProjectName" });
uiAssetsPath
uiAssetsPath
The path to which the {icon}.png
string will be added. Default is «https://enka.network/ui/
»
You can also use another resource
const enka = new EnkaNetwork({
uiAssetsPath: "https://api.ambr.top/assets/UI/",
});
And now we get links to UI assets from this resource

or you can specify the path to your local folder with ui assets
const enka = new EnkaNetwork({
uiAssetsPath: "/root/enka/assets/",
});
assets
assets
Params for AssetsUpdater
Last updated
Was this helpful?