Open dns-ls opened 1 year ago
Try with:
for type in pb.pokemon('charmander').types:
print(type.name)
Why? 'types' returns a type list, and type object is an APIMetadata object. According to the PokeAPI, a type request can contains:
{
"id": 5,
"name": "ground",
... more json data
}
Tried on both Windows and Linux, when requesting for pokemons type, the API always answers something like this (instead of "fire"):