LAMaglan / PokeFightSimulator

A (simple) fight simulator between any two Pokemon using FastAPI with Jinja frontend
0 stars 0 forks source link

Add "location" in pokemon_details page #84

Closed LAMaglan closed 5 months ago

LAMaglan commented 5 months ago

I.e. the location(s) details where the pokemon can be found. Looks like this:

"location_area_encounters": "https://pokeapi.co/api/v2/pokemon/132/encounters",

Which is an own JSON / payload. Can start off with the names of the locations.

"location_area": {
      "name": "sinnoh-route-218-area",
      "url": "https://pokeapi.co/api/v2/location-area/168/"
},
...
< more "location_area">
LAMaglan commented 5 months ago

Think about how to best display this. There can potentially be a lot of locations. A table?

LAMaglan commented 5 months ago

Have under header "Other" or similar

LAMaglan commented 5 months ago

I probably need an asynchronous function that makes GET request to the ["location_area_encounters"]["url"] before processing ["location_area"]["name"]