module

PokeAPI::Encounters

The PokeAPI::Encounters module contains methods to get data from the different endpoints in the Encounters group.

NOTE: see https://pokeapi.co/docs/v2#encounters-section

Instance methods

encounter_condition(identifier : String | UInt32) : PokeAPI::Types::EncounterCondition

Returns a PokeAPI::Types::EncounterCondition based on the given identifier. The identifier can be either the id or the name of the desired encounter condition.

Valid encounter conditions (2021-05-07):

+----+----------------+
| id |      name      |
+----+----------------+
|  1 | swarm          |
|  2 | time           |
|  3 | radar          |
|  4 | slot2          |
|  5 | radio          |
|  6 | season         |
|  7 | starter        |
|  8 | tv-option      |
|  9 | story-progress |
| 10 | other          |
+----+----------------+

An ArgumentError is raised if the identifier is an empty string or 0

Source
encounter_condition_value(identifier : String | UInt32) : PokeAPI::Types::EncounterConditionValue

Returns a PokeAPI::Types::EncounterConditionValue based on the given identifier. The identifier can be either the id or the name of the desired encounter condition value.

An ArgumentError is raised if the identifier is an empty string or 0

Source
encounter_method(identifier : String | UInt32) : PokeAPI::Types::EncounterMethod

Returns a PokeAPI::Types::EncounterMethod based on the given identifier. The identifier can be either the id or the name of the desired encounter method.

An ArgumentError is raised if the identifier is an empty string or 0

Source