-
Notifications
You must be signed in to change notification settings - Fork 3
Client Parameters
seria edited this page May 15, 2024
·
2 revisions
AmbrAPI
is the main class that you use to interact with the ambr API.
The AmbrAPI
class has the following parameters:
Changes the language of contents returned by the wrapper, such as weapon names, character names, etc.
import ambr
async with ambr.AmbrAPI(ambr.Language.CHT) as api:
...
Changes the headers when requesting to the Enka Network API, default is {"User-Agent": "ambr-py"}
import ambr
async with ambr.AmbrAPI(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 ambr
async with ambr.AmbrAPI(cache_ttl=30) as client:
...