PokeAPI / pokepy

A Python wrapper for PokéAPI
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
127 stars 27 forks source link

How to deal with subresources #63

Open hellow554 opened 4 years ago

hellow554 commented 4 years ago

e.g.

pokepy.V2Client().get_generation(1).pokemon_species[0]

is a NamedApiResource which points to PokemonSpecies

I haven't figured out yet, how to get the data from that NamedApiResource. Is there an easy way, e.g. get()?

Kronopt commented 4 years ago

At this moment you can't get that data directly with pokepy.

I was working on hypermedia resources a while ago to handle those kinds of situations, but I haven't had the time to work on it... My work is on the pagination branch, if you want to check it out