Skip to content

Client Parameters

seria edited this page May 15, 2024 · 1 revision

About YattaAPI

YattaAPI is the main class that you use to interact with the yatta API.
The YattaAPI class has the following parameters:

Language

Changes the language of contents returned by the wrapper, such as weapon names, light cone names, etc.

import yatta

async with yatta.YattaAPI(yatta.Language.CHT) as api:
    ...

Headers

Changes the headers when requesting to the Enka Network API, default is {"User-Agent": "ambr-py"}

import yatta

async with yatta.YattaAPI(headers={"User-Agent": "MyDiscordBot-1.0"}) as client:
    ...

Cache TTL

The time to live (ttl) in seconds for the internal cache to be evicted, the default is 3600 seconds.

import yatta

async with yatta.Yatta(cache_ttl=30) as client:
   ...
Clone this wiki locally