PokeAPI::Pokemon
The PokeAPI::Pokemon module contains methods to get data from the different
endpoints in the Pokémon group.
NOTE: see https://pokeapi.co/docs/v2#pokemon-section
Instance methods
Returns a PokeAPI::Types::Ability based on the given identifier.
The identifier can be either the id or the name of the desired ability.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Characteristic based on the given id.
An ArgumentError is raised if the id is 0
Returns a PokeAPI::Types::EggGroup based on the given identifier.
The identifier can be either the id or the name of the desired egg group.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Gender based on the given identifier.
The identifier can be either the id or the name of the desired gender.
Valid genders (2021-05-07):
+----+------------+
| id | name |
+----+------------+
| 1 | female |
| 2 | male |
| 3 | genderless |
+----+------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::GrowthRate based on the given identifier.
The identifier can be either the id or the name of the desired growth rate.
Valid growth rates (2021-05-07):
+----+---------------------+
| id | name |
+----+---------------------+
| 1 | slow |
| 2 | medium |
| 3 | fast |
| 4 | medium-slow |
| 5 | slow-then-very-fast |
| 6 | fast-then-very-slow |
+----+---------------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Nature based on the given identifier.
The identifier can be either the id or the name of the desired nature.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokeathlonStat based on the given identifier.
The identifier can be either the id or the name of the desired pokeathlon stat.
Valid pokeathlon stats (2021-05-07):
+----+---------+
| id | name |
+----+---------+
| 1 | speed |
| 2 | power |
| 3 | skill |
| 4 | stamina |
| 5 | jump |
+----+---------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Pokemon based on the given identifier.
The identifier can be either the id or the name of the desired pokémon.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokemonColor based on the given identifier.
The identifier can be either the id or the name of the desired pokémon color.
Valid pokemon colors (2021-05-07):
+----+--------+
| id | name |
+----+--------+
| 1 | black |
| 2 | blue |
| 3 | brown |
| 4 | gray |
| 5 | green |
| 6 | pink |
| 7 | purple |
| 8 | red |
| 9 | white |
| 10 | yellow |
+----+--------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokemonForm based on the given identifier.
The identifier can be either the id or the name of the desired pokémon form.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokemonHabitat based on the given identifier.
The identifier can be either the id or the name of the desired pokémon habitat.
Valid pokemon habitats (2021-05-07):
+----+---------------+
| id | name |
+----+---------------+
| 1 | cave |
| 2 | forest |
| 3 | grassland |
| 4 | mountain |
| 5 | rare |
| 6 | rough-terrain |
| 7 | sea |
| 8 | urban |
| 9 | waters-edge |
+----+---------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a an array of PokeAPI::Types::LocationAreaEncounter based on the given identifier.
The identifier can be either the id or the name of the desired pokémon.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokemonShape based on the given identifier.
The identifier can be either the id or the name of the desired pokémon shape.
Valid pokemon shapes (2021-05-07):
+----+-----------+
| id | name |
+----+-----------+
| 1 | ball |
| 2 | squiggle |
| 3 | fish |
| 4 | arms |
| 5 | blob |
| 6 | upright |
| 7 | legs |
| 8 | quadruped |
| 9 | wings |
| 10 | tentacles |
| 11 | heads |
| 12 | humanoid |
| 13 | bug-wings |
| 14 | armor |
+----+-----------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::PokemonSpecies based on the given identifier.
The identifier can be either the id or the name of the desired pokémon species.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Stat based on the given identifier.
The identifier can be either the id or the name of the desired stat.
Valid stats (2021-05-07):
+----+-----------------+
| id | name |
+----+-----------------+
| 1 | hp |
| 2 | attack |
| 3 | defense |
| 4 | special-attack |
| 5 | special-defense |
| 6 | speed |
| 7 | accuracy |
| 8 | evasion |
+----+-----------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::Type based on the given identifier.
The identifier can be either the id or the name of the desired pokémon type.
An ArgumentError is raised if the identifier is an empty string or 0