Closed sargunv closed 4 years ago
On hold as per discussion in https://github.com/PokeAPI/pokeapi/issues/216
@sargunster this functionality won't be removed, even if we choose to no longer support it, so it's okay to include it in the wrapper.
I'm just unsure of whether it should be added or not, since encouraging use of IDs seems better. Maybe it could be added but marked with @Deprecated
.
Regardless, I would work on it later since I'm going to spend a few days making progress on other things :P
Also, it would require me to include all the named JSON in the test resources, which would bulk up the repo a bit. I have plans so that'll no longer be a problem, but that'll require a Kobalt update.
I know this is a bit old but I just started using this library for an IRC Bot.
@sargunster Did you ever consider adding a static class for looking up ID by name using a local resource? I ended up just using an array of Strings and finding their position on that. It really didn't take me that long to create, but perhaps it could be something added here?
Edit: Unfortunately my knowledge of Kotlin is non-existent. I'm more proficient in Java and Groovy.
I was looking to just match the API call-for-call, so didn't do much extra. If you want to add something like that, I'm open to a PR.
Sorry for the late response.
get by name won't be supported.
Named resources should be retrievable by name too, not just by id.