Skip to content

Contest

pokelance.models.abstract.contest ⚓︎

ContestEffect ⚓︎

Bases: BaseModel

A contest effect resource.

Attributes:

Name Type Description
id int

The identifier for this contest effect resource.

appeal int

The base number of hearts the user of this move gets.

jam int

The base number of hearts the user's opponent loses.

effect_entries List[Effect]

The result of this contest effect listed in different languages.

flavor_text_entries List[FlavorText]

The flavor text of this contest effect listed in different languages.

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)

ContestType ⚓︎

Bases: BaseModel

A contest type resource.

Attributes:

Name Type Description
id int

The identifier for this contest type resource.

name str

The name for this contest type resource.

berry_flavor NamedResource

The berry flavor that correlates with this contest type.

names List[Name]

The name of this contest type listed in different languages.

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)

SuperContestEffect ⚓︎

Bases: BaseModel

A super contest effect resource.

Attributes:

Name Type Description
id int

The identifier for this super contest effect resource.

appeal int

The level of appeal this super contest effect has.

flavor_text_entries List[FlavorText]

The flavor text of this super contest effect listed in different languages.

moves List[NamedResource]

A list of moves that have the effect when used in super contests.

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)