DDragonClient
Bases: BaseClient
Data Dragon Client.
Resources | Support |
---|---|
League of Legends | ❎ Use CDragon instead. |
Teamfight Tactics | ❎ |
Legends of Runeterra | ✅ |
Valorant | ❎ |
Example:
async with DDragonClient(
default_params={"patch": "latest", "locale": "en_us"}
) as client:
cards = await client.get_lor_cards(set=8)
assert cards[0]["cardCode"]
Source code in pulsefire/clients.py
Attributes
Locale
class-attribute
instance-attribute
Locale = (
Literal[
"ar_ae",
"cs_cz",
"de_de",
"el_gr",
"en_au",
"en_gb",
"en_ph",
"en_sg",
"en_us",
"es_ar",
"es_es",
"es_mx",
"fr_fr",
"hu_hu",
"it_it",
"ja_jp",
"ko_kr",
"pl_pl",
"pt_br",
"ro_ro",
"ru_ru",
"th_th",
"tr_tr",
"vi_vn",
"vn_vn",
"zh_cn",
"zh_my",
"zh_tw",
]
| _str
)
Functions
__init__
__init__(
*,
base_url: str = "https://dd.b.pvp.net",
default_params: dict[str, Any] = {"patch": ..., "locale": ...},
default_headers: dict[str, str] = {},
default_queries: dict[str, str] = {},
middlewares: list[Middleware] = [
json_response_middleware(),
http_error_middleware(),
]
) -> None