Location Areas
LocationArea
¶
Represent a location area resource returned by PokéAPI.
Location areas represent sections of locations, such as floors in a building or cave. Each area defines the Pokémon that can be encountered there and the methods used to encounter them.
This model corresponds to the https://pokeapi.co/api/v2/location-area/{id or name}/ endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
The unique identifier of the location area. |
name |
str
|
The name of the location area. |
game_index |
int
|
The internal identifier of this resource within the game data. |
encounter_method_rates |
list[EncounterMethodRate]
|
The encounter methods available in this area and their rates for different game versions. |
location |
NamedAPIResource
|
The location that contains this area. |
names |
list[Name]
|
The localized names of this location area in different languages. |
pokemon_encounters |
list[PokemonEncounter]
|
The Pokémon that can be encountered in this area and their version-specific details. |
EncounterMethodRate
¶
Represent an encounter method and its rates in different game versions.
Attributes:
| Name | Type | Description |
|---|---|---|
encounter_method |
NamedAPIResource
|
The method used to encounter Pokémon in this location area. |
version_details |
list[EncounterVersionDetails]
|
The encounter rates associated with this method across different game versions. |
EncounterVersionDetails
¶
Represent an encounter rate for a specific game version.
Attributes:
| Name | Type | Description |
|---|---|---|
rate |
int
|
The chance of an encounter occurring with this method in the specified game version. |
version |
NamedAPIResource
|
The game version to which this rate applies. |
PokemonEncounter
¶
Represent a Pokémon that can be encountered in a location area.
Attributes:
| Name | Type | Description |
|---|---|---|
pokemon |
NamedAPIResource
|
The Pokémon that can be encountered. |
version_details |
list[VersionEncounterDetail]
|
The game versions and encounter details associated with this Pokémon. |