Skip to content

Client

ZZZClient

Bases: BaseClient

The main client to interact with the Enka Network Zenless Zone Zero API.

Parameters:

Name Type Description Default
lang Language | str

The language to use for the client, defaults to Language.ENGLISH.

ENGLISH
headers dict[str, Any] | None

The headers to use for the client, defaults to None.

None
cache BaseTTLCache | None

The cache to use for the client, defaults to None.

None
timeout int

The timeout for the client, defaults to DEFAULT_TIMEOUT.

DEFAULT_TIMEOUT

fetch_builds(owner) async

Fetch the character builds of the given owner.

Parameters:

Name Type Description Default
owner Owner | OwnerInput

The owner of the builds.

required

Returns:

Type Description
dict[str, list[Build]]

Character ID to list of builds mapping.

fetch_showcase(uid, *, raw=False) async

fetch_showcase(uid: str | int, *, raw: Literal[False] = False) -> models.ShowcaseResponse
fetch_showcase(uid: str | int, *, raw: Literal[True] = True) -> dict[str, Any]

Fetch the player showcase of the given UID.

Parameters:

Name Type Description Default
uid str | int

The UID of the user.

required
raw bool

Whether to return the raw data, defaults to False.

False

Returns:

Type Description
ShowcaseResponse | dict[str, Any]

The parsed or raw showcase data.

parse_showcase(data)

Parse the given showcase data.

Parameters:

Name Type Description Default
data dict[str, Any]

The showcase data.

required

Returns:

Type Description
ShowcaseResponse

The parsed showcase response.

update_assets() async

Update game assets.