[docs]classPokemonClient(BaseClient):"""Represents the "Pokemon" endpoint. This class is not meant to be instantiated by the user. Instead, access it through the :attr:`~somerandomapi.Client.pokemon` attribute of the :class:`~somerandomapi.Client` class. """
[docs]asyncdefget_ability(self,ability:str)->PokemonAbility:"""Get a pokemon ability's information. Parameters ---------- ability: :class:`str` The ability name or id of a pokemon ability. Returns ------- :class:`PokemonAbility` Object representing the pokemon ability. """res=awaitself._http.request(PokemonEndpoints.ABILITIES,ability=ability)returnPokemonAbility(res)
[docs]asyncdefget_item(self,item:str)->PokemonItem:"""Get a pokemon item's information. Parameters ---------- item: :class:`str` The Item name or id of a pokemon item. Returns ------- :class:`PokemonItem` Object representing the pokemon item. """res=awaitself._http.request(PokemonEndpoints.ITEMS,item=item)returnPokemonItem(res)
[docs]asyncdefget_moves(self,move:str)->PokemonMove:"""Get a pokemon move's information. Parameters ---------- move: :class:`str` The pokemon move name or id of a pokemon move Returns ------- :class:`PokemonMove` Object representing the pokemon move. """res=awaitself._http.request(PokemonEndpoints.MOVES,move=move)returnPokemonMove(res)
[docs]asyncdefget_pokedex(self,pokemon:str)->PokeDex:"""Get a pokemon's pokedex entry. Parameters ---------- pokemon: :class:`str` The pokemon to get the pokedex entry for. Returns ------- :class:`PokeDex` Object representing the pokedex entry. """res=awaitself._http.request(PokemonEndpoints.POKEDEX,pokemon=pokemon)returnPokeDex(res)