class

PokeAPI::Client

Inherits Reference < Object

PokeAPI::Client handles requests to pokeapi.co.

NOTE: The methods in PokeAPI::Client is not meant to be used directly. It is highly recommened to use the PokeAPI methods instead, e.g. PokeAPI.pokemon or PokeAPI.resource.

Class methods

get(path : String, limit : UInt32, offset : UInt32) : HTTP::Client::Response

Requests pokeapi.co for limit items at the given path.

Example:

require "pokeapi"

response = PokeAPI::Client.get("pokemon", 20, 0)
Source

Requests pokeapi.co for a single item at the given path.

Example:

require "pokeapi"

response = PokeAPI::Client.get("pokemon/bulbasaur")
Source