-
Notifications
You must be signed in to change notification settings - Fork 0
Client Parameters
seria edited this page May 15, 2024
·
1 revision
YattaAPI
is the main class that you use to interact with the yatta API.
The YattaAPI
class has the following parameters:
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:
...
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:
...
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:
...