# AssetsUpdater

**`AssetsUpdater`** - a class that auto updates assets data and localization that are used inside [**`EnkaNetwork`**](https://kravets.gitbook.io/enkanetwork/class-description/enkanetwork)

### `languages`

Array of languages with localization

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

```typescript
const enka = new EnkaNetwork({
    language: "EN", // This value is automatically included in the array
    assets: {
        languages: ["RU", "FR"], // This array already contains EN
    },
});
```

### `checkInterval`

The interval for checking the relevance of assets in milliseconds. Default is 30 \* 60 \* 1000 (half hour)

```typescript
const enka = new EnkaNetwork({
    assets: {
        checkInterval: 10 * 60 * 1000, // 10 minutes
    },
});
```

### `instant`

Check immediately for the first time (a less convenient analogue of fetchAssets)

```typescript
const enka = new EnkaNetwork({
    assets: {
        instant: true,
    },
});
```

***

### `fetchAssets()`

Async function that checks the relevance of assets data and localization

{% code overflow="wrap" %}

```typescript
import { EnkaNetwork } from "enkanetwork"; // ES style which I will use in the future

const enka = new EnkaNetwork(); // English is the default language

await enka.assetsUpdater.fetchAssets(); // We are waiting for checking the relevance/updating of the data. If the language did not exist in assets, it will be downloaded.

enka.fetchUser(700832641).then(console.log); // We get up-to-date information in English localization

```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kravets.gitbook.io/enkanetwork/class-description/assetsupdater.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
