Skip to content

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 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 the effect of a TCG card.

Parameters:

Returns:

get_tcg_cards async

Get TCG cards available in the card plaza.

Parameters:

Returns:

get_tcg_deck async

get_tcg_deck(
    deck: Union[str, TCGDeck], *, lang: Optional[str] = None
) -> TCGDeck

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:

  • label

    (Optional[IDOr[TCGDeckLabel]], default: None ) –

    Label to filter by, defaults to "General".

  • characters

    (Optional[Sequence[IDOr[TCGDeckCharacterCard]]], default: None ) –

    Character cards the decks must contain.

  • keywords

    (str, default: '' ) –

    Keywords to search for.

  • newest

    (bool, default: False ) –

    Sort by newest instead of most popular.

  • limit

    (Optional[int], default: None ) –

    Maximum amount of decks to return.

  • page_size

    (int, default: DECK_PAGE_SIZE ) –

    Amount of decks to fetch per request.

  • lang

    (Optional[str], default: None ) –

    Language of the response.

Returns:

request_card_plaza async

request_card_plaza(
    endpoint: str,
    *,
    method: str = "GET",
    lang: Optional[str] = None,
    params: Optional[Mapping[str, Any]] = None,
    **kwargs: Any,
) -> Mapping[str, Any]

Make a request towards the card plaza endpoint.