Skip to content

Locations

pokelance.models.abstract.utils.locations ⚓︎

EncounterMethodRate ⚓︎

Bases: BaseModel

An encounter method rate resource.

Attributes:

Name Type Description
encounter_method NamedResource

The method in which Pokémon may be encountered in an area.

version_details List[EncounterVersionDetails]

A list of version details for the encounter.

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)

EncounterVersionDetails ⚓︎

Bases: BaseModel

An encounter version details resource.

Attributes:

Name Type Description
rate int

The chance of an encounter to occur.

version NamedResource

The version of this encounter.

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)

PalParkEncounterSpecies ⚓︎

Bases: BaseModel

A pal park encounter species resource.

Attributes:

Name Type Description
base_score int

The base score given to the player when this Pokémon is caught during a pal park run.

rate int

The base rate for encountering this Pokémon in pal park.

pokemon_species NamedResource

The Pokémon species being encountered.

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)

PokemonEncounter ⚓︎

Bases: BaseModel

A pokemon encounter resource.

Attributes:

Name Type Description
pokemon NamedResource

The Pokémon being encountered.

version_details List[VersionEncounterDetail]

A list of versions and encounters with Pokémon that might happen in the referenced location area.

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)