Card Plaza Client
CardPlazaClient
CardPlazaClient(
cookies: Optional[AnyCookieOrHeader] = None,
*,
authkey: Optional[str] = None,
lang: Lang = "en-us",
region: Region = OVERSEAS,
proxy: Optional[str] = None,
game: Optional[Game] = None,
uid: Optional[int] = None,
hoyolab_id: Optional[int] = None,
device_id: Optional[str] = None,
device_fp: Optional[str] = None,
headers: Optional[LooseHeaders] = None,
cache: Optional[BaseCache] = None,
debug: bool = False,
on_cookie_update: Optional[CookieUpdateHook] = None,
)
TCG card plaza component.
Methods:
-
get_tcg_card_effect–Get the effect of a TCG card.
-
get_tcg_cards–Get TCG cards available in the card plaza.
-
get_tcg_deck–Get a card plaza deck by its ID.
-
get_tcg_deck_comments–Get comments on a card plaza deck.
-
get_tcg_deck_labels–Get card plaza labels, such as game modes and boss challenges.
-
get_tcg_decks–Get decks from the card plaza.
-
request_card_plaza–Make a request towards the card plaza endpoint.
get_tcg_card_effect
async
get_tcg_card_effect(
card: TCGDeckCharacterCard, *, lang: Optional[str] = ...
) -> Sequence[TCGDeckSkill]
get_tcg_card_effect(
card: TCGDeckActionCard, *, lang: Optional[str] = ...
) -> TCGDeckActionCardEffect
get_tcg_card_effect(
card: int, *, lang: Optional[str] = ...
) -> Union[Sequence[TCGDeckSkill], TCGDeckActionCardEffect]
get_tcg_card_effect(
card: Union[
int, TCGDeckCharacterCard, TCGDeckActionCard
],
*,
lang: Optional[str] = None,
) -> Union[Sequence[TCGDeckSkill], TCGDeckActionCardEffect]
Get the effect of a TCG card.
Parameters:
-
(cardUnion[int, TCGDeckCharacterCard, TCGDeckActionCard]) –Card or card ID. Bare IDs below 10000 are treated as character cards.
-
(langOptional[str], default:None) –Language of the response.
Returns:
-
Union[Sequence[TCGDeckSkill], TCGDeckActionCardEffect]–Skills of a character card, or the effect description and cost of an action card.
get_tcg_cards
async
get_tcg_cards(
card_types: Optional[Sequence[TCGDeckCardType]] = None,
*,
lang: Optional[str] = None,
) -> Sequence[
Union[TCGDeckCharacterCard, TCGDeckActionCard]
]
Get TCG cards available in the card plaza.
Parameters:
-
(card_typesOptional[Sequence[TCGDeckCardType]], default:None) –Types of cards to get, defaults to all cards.
-
(langOptional[str], default:None) –Language of the response.
Returns:
-
Sequence[Union[TCGDeckCharacterCard, TCGDeckActionCard]]–Character cards and/or action cards, depending on
card_types.
get_tcg_deck
async
Get a card plaza deck by its ID.
get_tcg_deck_comments
get_tcg_deck_comments(
deck: Union[str, TCGDeck],
*,
limit: Optional[int] = None,
) -> TokenPaginator[TCGDeckComment]
Get comments on a card plaza deck.
get_tcg_deck_labels
async
get_tcg_deck_labels(
*, lang: Optional[str] = None
) -> Sequence[TCGDeckLabel]
Get card plaza labels, such as game modes and boss challenges.
get_tcg_decks
get_tcg_decks(
label: Optional[IDOr[TCGDeckLabel]] = None,
*,
characters: Optional[
Sequence[IDOr[TCGDeckCharacterCard]]
] = None,
keywords: str = "",
newest: bool = False,
limit: Optional[int] = None,
page_size: int = DECK_PAGE_SIZE,
lang: Optional[str] = None,
) -> TokenPaginator[TCGDeck]
Get decks from the card plaza.
Parameters:
-
(labelOptional[IDOr[TCGDeckLabel]], default:None) –Label to filter by, defaults to "General".
-
(charactersOptional[Sequence[IDOr[TCGDeckCharacterCard]]], default:None) –Character cards the decks must contain.
-
(keywordsstr, default:'') –Keywords to search for.
-
(newestbool, default:False) –Sort by newest instead of most popular.
-
(limitOptional[int], default:None) –Maximum amount of decks to return.
-
(page_sizeint, default:DECK_PAGE_SIZE) –Amount of decks to fetch per request.
-
(langOptional[str], default:None) –Language of the response.
Returns:
-
TokenPaginator[TCGDeck]–Paginator over the matching decks.