Getting started¶
Install¶
The library is published on Maven Central as fr.tykok:pokeapi. Pick your build system:
Version
The snippets above are filled in at build time from the version this site was published for, so they always match the chip in the top-right corner. The Maven Central listing is the authoritative index of every published release.
Requirements¶
| JVM | 17 or later |
| Kotlin | 2.1 or later |
| Transitive dependencies | OkHttp, Jackson (jackson-module-kotlin) |
First request¶
import fr.tykok.pokeapi.PokeApi
import fr.tykok.pokeapi.entities.pokemon.Pokemon
fun main() {
val pikachu = PokeApi.get<Pokemon>(name = "pikachu")
println(pikachu.name) // pikachu
println(pikachu.weight) // 60
}
Head to Methods for the full set of get() overloads, or browse the
API Reference for every entity you can ask for.