pokelance.models.abstract.utils.contests ⚓︎

ContestName ⚓︎

Bases: BaseModel

A contest name resource.

Attributes:
  • name (str) –

    The name for this contest.

  • color (str) –

    The color associated with this contest's name.

  • language (NamedResource) –

    The language that this name is in.

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)