Skip to content

API Reference

gi

Classes:

  • GIClient

    Client to interact with the Hakushin Genshin Impact API.

GIClient

Client to interact with the Hakushin Genshin Impact API.

Methods:

fetch_artifact_set_detail async

fetch_artifact_set_detail(
    set_id: int, *, use_cache: bool = True
) -> ArtifactSetDetail

Fetch the details of a Genshin Impact artifact set.

Parameters:

  • set_id
    (int) –

    The artifact set ID.

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_artifact_sets async

fetch_artifact_sets(
    *, use_cache: bool = True, version: str | None = None
) -> list[ArtifactSet]

Fetch all Genshin Impact artifact sets.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

  • version
    (str | None, default: None ) –

    The version of the artifact sets to fetch.

Returns: A list of artifact set objects.

fetch_character_detail async

fetch_character_detail(
    character_id: str, *, use_cache: bool = True
) -> CharacterDetail

Fetch the details of a Genshin Impact character.

Parameters:

  • character_id
    (str) –

    The character ID.

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_characters async

fetch_characters(
    *, use_cache: bool = True, version: str | None = None
) -> list[Character]

Fetch all Genshin Impact characters.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

  • version
    (str | None, default: None ) –

    The version of the characters to fetch.

Returns:

fetch_mw_costume_sets async

fetch_mw_costume_sets(
    *, use_cache: bool = True
) -> list[MWCostumeSet]

Fetch all Miliastra Wonderland costume sets.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_mw_costumes async

fetch_mw_costumes(
    *, use_cache: bool = True
) -> list[MWCostume]

Fetch all Miliastra Wonderland costumes and costume sets.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

  • list[MWCostume]

    A list of Miliastra Wonderland costumes and costume sets.

fetch_mw_items async

fetch_mw_items(*, use_cache: bool = True) -> list[MWItem]

Fetch all Miliastra Wonderland items.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

  • list[MWItem]

    A list of Miliastra Wonderland items.

fetch_stygian_detail async

fetch_stygian_detail(
    stygian_id: int, *, use_cache: bool = True
) -> StygianDetail

Fetch the details of a Stygian Onslaught entry.

Parameters:

  • stygian_id
    (int) –

    The Stygian ID.

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_stygians async

fetch_stygians(*, use_cache: bool = True) -> list[Stygian]

Fetch all Genshin Impact Stygian Onslaught entries.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_weapon_detail async

fetch_weapon_detail(
    weapon_id: int, *, use_cache: bool = True
) -> WeaponDetail

Fetch the details of a Genshin Impact weapon.

Parameters:

  • weapon_id
    (int) –

    The weapon ID.

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

Returns:

fetch_weapons async

fetch_weapons(
    *, use_cache: bool = True, version: str | None = None
) -> list[Weapon]

Fetch all Genshin Impact weapons.

Parameters:

  • use_cache
    (bool, default: True ) –

    Whether to use the response cache.

  • version
    (str | None, default: None ) –

    The version of the weapons to fetch.

Returns: