PokeAPI::Items
The PokeAPI::Items module contains methods to get data from the different
endpoints in the Items group.
NOTE: see https://pokeapi.co/docs/v2#items-section
Instance methods
Returns a PokeAPI::Types::Item based on the given identifier.
The identifier can be either the id or the name of the desired item.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::ItemAttribute based on the given identifier.
The identifier can be either the id or the name of the desired item attribute.
Valid item attributes (2021-05-08):
+----+------------------+
| id | name |
+----+------------------+
| 1 | countable |
| 2 | consumable |
| 3 | usable-overworld |
| 4 | usable-in-battle |
| 5 | holdable |
| 6 | holdable-passive |
| 7 | holdable-active |
| 8 | underground |
+----+------------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::ItemCategory based on the given identifier.
The identifier can be either the id or the name of the desired item category.
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::ItemFlingEffect based on the given identifier.
The identifier can be either the id or the name of the desired item fling effect.
Valid item fling effects (2021-05-08):
+----+--------------+
| id | name |
+----+--------------+
| 1 | badly-poison |
| 2 | burn |
| 3 | berry-effect |
| 4 | herb-effect |
| 5 | paralyze |
| 6 | poison |
| 7 | flinch |
+----+--------------+
An ArgumentError is raised if the identifier is an empty string or 0
Returns a PokeAPI::Types::ItemPocket based on the given identifier.
The identifier can be either the id or the name of the desired item pocket.
Valid item pockets (2021-05-08):
+----+-----------+
| id | name |
+----+-----------+
| 1 | misc |
| 2 | medicine |
| 3 | pokeballs |
| 4 | machines |
| 5 | berries |
| 6 | mail |
| 7 | battle |
| 8 | key |
+----+-----------+
An ArgumentError is raised if the identifier is an empty string or 0