Skip to content

Pokedex

TRACTION edited this page Sep 15, 2023 · 1 revision

Class: Pokedex

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Pokedex(options?)

Parameters

Name Type
options PokedexOptions

Defined in

pokedex.ts:73

Properties

authorization

Private authorization: string

Defined in

pokedex.ts:70


url

Private url: string

Defined in

pokedex.ts:69


useragent

Private useragent: string

Defined in

pokedex.ts:71

Methods

getEvolutionStone

getEvolutionStone(name): Promise<EvolutionStone>

Get the details of the specified evolution stone.

Parameters

Name Type
name string

Returns

Promise<EvolutionStone>

Defined in

pokedex.ts:96


getPokemon

getPokemon(slug): Promise<Pokemon[]>

Get the details of the specified Pokémon and its forms.

Parameters

Name Type
slug string | number

Returns

Promise<Pokemon[]>

Defined in

pokedex.ts:101


listEvolutionStones

listEvolutionStones(): Promise<EvolutionStoneList>

Get a list of all the evolution stones.

Returns

Promise<EvolutionStoneList>

Defined in

pokedex.ts:106


listPokemon

listPokemon(): Promise<PokemonList>

Get a list of all the discovered Pokémon.

Returns

Promise<PokemonList>

Defined in

pokedex.ts:111


request

Private request<R>(path?): Promise<R>

Type parameters

Name
R

Parameters

Name Type Default value
path string "/"

Returns

Promise<R>

Defined in

pokedex.ts:79