pokelance.models.abstract.machine ⚓︎

Machine ⚓︎

Bases: BaseModel

Machine model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • item (NamedResource) –

    The item that is required to use the TM or HM.

  • move (NamedResource) –

    The move that is taught by the TM or HM.

  • version_group (NamedResource) –

    The version group that this machine applies to.

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)