Skip to content

Items

pokelance.models.abstract.utils.items ⚓︎

ItemHolderPokemon ⚓︎

Bases: BaseModel

An item holder pokemon resource.

Attributes:

Name Type Description
pokemon str

The Pokémon that holds this item.

version_details List[ItemHolderPokemonVersionDetail]

The details for the version that this item is held in by the Pokémon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
Dict[str, Any]

The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemHolderPokemonVersionDetail ⚓︎

Bases: BaseModel

An item holder pokemon version detail resource.

Attributes:

Name Type Description
rarity int

The chance of this Pokémon holding this item in this version.

version NamedResource

The version that this item is held in by the Pokémon.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
Dict[str, Any]

The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemSprites ⚓︎

Bases: BaseModel

An item sprites resource.

Attributes:

Name Type Description
default str

The default depiction of this item.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
Dict[str, Any]

The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)