Skip to content

Contests

pokelance.models.abstract.utils.contests ⚓︎

ContestName ⚓︎

Bases: BaseModel

A contest name resource.

Attributes:

Name Type Description
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:

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)