-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add (caching) support for LocationAreaEncounters #10
Comments
FYI I requested background from the friendly folks on slack |
So here's the funny part ... the way I've filed an issue on PokeAPI, but in the meantime I'll add special handling for them, to be included in the next release. (And then hopefully I can get a clear answer on what PokeAPI's planned way to handle them is, and clean up the wrapper code and the PokeAPI docs) Good catch and thanks for the help! I'll close this issue once I write the fix and push the next release to PyPI. |
@GregHilmes - so I was looking at the current state of the changes, and noticed that there's a significant performance drop off from the changes: Namely, once the cache is set, retrieving a pokemon takes an order of magnitude longer (jumping from taking ~.25s to ~3s).
Let me know if you want a separate issue for that or anything. |
Good catch! This should definitely be a separate issue - it has nothing to do with this issue. Please go ahead and file accordingly. |
The pokeapi has an attribute that doesn't follow their typical NamedAPIResource pattern: LocationAreaEncounters. Per the docs, when looking up a pokemon's
location_area_encounters
, it returns astring (URL to list LocationAreaEncounter)
.It would be really awesome if pokebase's API implemented lookup and caching for this nonstandard resource. I glanced over the code in hopes of submitting a PR, but as a relative python n00b, I'm having some trouble gauging how best to do this. I'd rather not re-implement caching for this API endpoint outside pokebase.
The text was updated successfully, but these errors were encountered: