module PokeAPI::Moves
Overview
The PokeAPI::Moves
module contains methods to get data from the different
endpoints in the Moves group.
NOTE see https://pokeapi.co/docs/v2#moves-section
Defined in:
pokeapi/moves.crInstance Method Summary
-
#move(identifier : String | UInt32) : PokeAPI::Types::Move
Returns a
PokeAPI::Types::Move
based on the given identifier. -
#move_ailment(identifier : String | Int32) : PokeAPI::Types::MoveAilment
Returns a
PokeAPI::Types::MoveAilment
based on the given identifier. -
#move_battle_style(identifier : String | UInt32) : PokeAPI::Types::MoveBattleStyle
Returns a
PokeAPI::Types::MoveBattleStyle
based on the given identifier. -
#move_category(identifier : String | UInt32) : PokeAPI::Types::MoveCategory
Returns a
PokeAPI::Types::MoveCategory
based on the given identifier. -
#move_damage_class(identifier : String | UInt32) : PokeAPI::Types::MoveDamageClass
Returns a
PokeAPI::Types::MoveDamageClass
based on the given identifier. -
#move_learn_method(identifier : String | UInt32) : PokeAPI::Types::MoveLearnMethod
Returns a
PokeAPI::Types::MoveLearnMethod
based on the given identifier. -
#move_target(identifier : String | UInt32) : PokeAPI::Types::MoveTarget
Returns a
PokeAPI::Types::MoveTarget
based on the given identifier.
Instance Method Detail
Returns a PokeAPI::Types::Move
based on the given identifier.
The identifier can be either the id or the name of the desired move.
An ArgumentError
is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::MoveAilment
based on the given identifier.
The identifier can be either the id or the name of the desired move ailment.
An ArgumentError
is raised if:
- the identifier is an empty string
- the identifier is an integer AND lower than -1
Returns a PokeAPI::Types::MoveBattleStyle
based on the given identifier.
The identifier can be either the id or the name of the desired move battle style.
Valid move battle styles (2021-05-08):
+----+---------+
| id | name |
+----+---------+
| 1 | attack |
| 2 | defense |
| 3 | support |
+----+---------+
An ArgumentError
is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::MoveCategory
based on the given identifier.
The identifier can be either the id or the name of the desired move category.
Valid move categories (2021-05-08):
+----+--------------------+
| id | name |
+----+--------------------+
| 0 | damage |
| 1 | ailment |
| 2 | net-good-stat |
| 3 | heal |
| 4 | damage+ailment |
| 5 | swagger |
| 6 | damage+lower |
| 7 | damage+raise |
| 8 | damage+heal |
| 9 | ohko |
| 10 | whole-field-effect |
| 11 | field-effect |
| 12 | force-switch |
| 13 | unique |
+----+--------------------+
An ArgumentError
is raised if the identifier is an empty string
Returns a PokeAPI::Types::MoveDamageClass
based on the given identifier.
The identifier can be either the id or the name of the desired move damage class.
Valid move damage classes (2021-05-08):
+----+----------+
| id | name |
+----+----------+
| 1 | status |
| 2 | physical |
| 3 | special |
+----+----------+
An ArgumentError
is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::MoveLearnMethod
based on the given identifier.
The identifier can be either the id or the name of the desired move learn method.
Valid move learn methods (2021-05-08):
+----+--------------------------+
| id | name |
+----+--------------------------+
| 1 | level-up |
| 2 | egg |
| 3 | tutor |
| 4 | machine |
| 5 | stadium-surfing-pikachu |
| 6 | light-ball-egg |
| 7 | colosseum-purification |
| 8 | xd-shadow |
| 9 | xd-purification |
| 10 | form-change |
+----+--------------------------+
An ArgumentError
is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::MoveTarget
based on the given identifier.
The identifier can be either the id or the name of the desired move target.
An ArgumentError
is raised if the identifier is an empty string or 0