Skip to content
v2.0.0

Utility

No. 011 Utility reference only

Language

Language describes one of the languages pokeapi.co translates its resources into, and mirrors the /language resource:

data class Language(
    val id: Number,
    val name: String,
    val official: Boolean,
    val iso639: String,
    val iso3166: String,
    val names: List<Name>
)

Not reachable through PokeApi.get() yet

Language is not registered in EndpointReference, so PokeApi.get<Language>(id = 1) throws UnknownEndpointException. You will meet the class as the language field of the names, descriptions and flavor_text_entries lists returned by the other endpoints:

val berry = PokeApi.get<BerryFlavor>(id = 1)
val english = berry.names.first { it.language.name == "en" }