Types
Type
¶
Represent a type resource returned by PokéAPI.
Types determine the elemental properties of Pokémon and moves, including their damage effectiveness against other types.
This model corresponds to the https://pokeapi.co/api/v2/type/{id or name}/ endpoint.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
The unique identifier of the type. |
name |
str
|
The name of the type. |
damage_relations |
TypeRelations
|
The damage effectiveness of this type against other types and its susceptibility to them. |
past_damage_relations |
list[TypeRelationsPast]
|
The historical damage relations of this type across previous generations. |
game_indices |
list[GenerationGameIndex]
|
The game indices assigned to this type in different generations. |
generation |
NamedAPIResource
|
The generation in which this type was introduced. |
move_damage_class |
NamedAPIResource
|
The damage class associated with this type. |
names |
list[Name]
|
The localized names of this type in different languages. |
pokemon |
list[TypePokemon]
|
The Pokémon that have this type, including the position of the type in their type list. |
moves |
list[NamedAPIResource]
|
The moves that have this type. |
sprites |
dict | None
|
Additional sprite data associated with this type, or |
TypePokemon
¶
Represent a Pokémon that has a particular type.
Attributes:
| Name | Type | Description |
|---|---|---|
slot |
int
|
The position of this type in the Pokémon's type list. |
pokemon |
NamedAPIResource
|
The Pokémon that has this type. |
TypeRelations
¶
Represent the damage effectiveness of a type against other types.
Attributes:
| Name | Type | Description |
|---|---|---|
no_damage_to |
list[NamedAPIResource]
|
The types against which thistype deals no damage. |
half_damage_to |
list[NamedAPIResource]
|
The types against which this type deals half damage. |
double_damage_to |
list[NamedAPIResource]
|
The types against which this type deals double damage. |
no_damage_from |
list[NamedAPIResource]
|
The types whose moves deal no damage to this type. |
half_damage_from |
list[NamedAPIResource]
|
The types whose moves deal half damage to this type. |
double_damage_from |
list[NamedAPIResource]
|
The types whose moves deal double damage to this type. |
TypeRelationsPast
¶
Represent historical damage relations for a type.
Attributes:
| Name | Type | Description |
|---|---|---|
generation |
NamedAPIResource
|
The last generation in which the listed damage relations applied. |
damage_relations |
TypeRelations
|
The damage relations that applied up to and including the specified generation. |