API Reference¶
Every entity class maps one endpoint of pokeapi.co. Pass the class as the generic parameter of PokeApi.get() and the endpoint is resolved for you.
Suspending calls¶
PokeApi.get() and PokeApi.list() are suspend functions. Every one-liner on this page and on
the 11 entity pages linked below is written exactly as it looks inside a coroutine โ without
repeating that setup fifty times over โ but it will not compile at a plain call site. A real call
site looks like this:
Calling from code with no coroutine in scope? Use the blocking counterpart instead:
See Methods for every get/list overload and its blocking twin.
48 endpoints are wired across 11 groups.
No. 001๐พ Pokemon16 endpoints
No. 003๐ Contest3 endpoints
No. 004๐ฟ Encounter3 endpoints
No. 005๐งฌ Evolution2 endpoints
Asking for a class that is not mapped throws UnknownEndpointException.