pokelance.models.abstract.utils.items ⚓︎

ItemHolderPokemon ⚓︎

Bases: BaseModel

An item holder pokemon resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • 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:
  • 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:
  • 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:
  • default (str) –

    The default depiction of this item.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • 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)