Reputation: 33
Are there ways I can get a Pokemon's Pokedex entry description? I've tried looking in the API documentation to come with no avail. The closest thing I could find was a Pokedex JSON but even that didn't contain the Pokemon's PD entry description alongside with Pokemon Species. Unless I didn't look hard enough do you know where I can fetch a Pokemon's dex entry description?
Thanks
Upvotes: 3
Views: 7209
Reputation: 41
to add onto @Rinkesh P's answer, you can replace the '\n's with spaces. The '\n' is actually an escape sequence in ASCII. It's mainly used in programming languages such as C, Pearl, and Java. But in most cases, you're probably just gonna load up the description and display it in HTML --So just write up a function to replace it with a space(' ').
Upvotes: 0
Reputation: 678
I guess you missed the flavor-text-entries in apiv2. This is for pikachu
GET https://pokeapi.co/api/v2/pokemon-species/25
A part of the output
{
"flavor_text": "It has small electric sacs on both its\ncheeks. If threatened, it looses electric\ncharges from the sacs.",
"language": {
"name": "en",
"url": "https://pokeapi.co/api/v2/language/9/"
},
"version": {
"name": "firered",
"url": "https://pokeapi.co/api/v2/version/10/"
}
}
Similarly it's available for other game versions as well.
Upvotes: 7