pokelance.models.abstract.utils.locations ⚓︎

EncounterMethodRate ⚓︎

Bases: BaseModel

An encounter method rate resource.

Attributes:

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)

EncounterVersionDetails ⚓︎

Bases: BaseModel

An encounter version details resource.

Attributes:
  • 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:
  • 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:
  • 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:
  • 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:
  • 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:
  • 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)