Skip to content

Contests

pokelance.models.abstract.utils.contests ⚓︎

ContestEffectFlavorText ⚓︎

Bases: BaseModel

A contest effect flavor text resource.

Attributes:

Name Type Description
flavor_text str

The flavor text for this contest effect.

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

SuperContestEffectFlavorText ⚓︎

Bases: BaseModel

A super contest effect flavor text resource.

Attributes:

Name Type Description
flavor_text str

The flavor text for this super contest effect.

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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Comments