module Evolution

Overview

The Evolution module contains methods to get data from the different endpoints in the Evolution group.

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

Defined in:

pokeapi/evolution.cr

Instance Method Summary

Instance Method Detail

def evolution_chain(id : UInt32) : PokeAPI::Types::EvolutionChain #

Returns a PokeAPI::Types::EvolutionChain based on the given id.

An ArgumentError is raised if the id is 0


[View source]
def evolution_trigger(identifier : String | UInt32) : PokeAPI::Types::EvolutionTrigger #

Returns a PokeAPI::Types::EvolutionTrigger based on the given identifier. The identifier can be either the id or the name of the desired evolution trigger.

Valid evolution triggers (2021-05-07): +----+----------+ | id | name | +----+----------+ | 1 | level-up | | 2 | trade | | 3 | use-item | | 4 | shed | | 5 | other | +----+----------+

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


[View source]