You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My main motivation is to move away from beckett.
I could then implement both synchronous and asynchronous clients, using requests and aiohttp respectively.
The code base would be basically the same, with only the client implementation being different for sync/async.
This way I think I can make the code more easier to read and maintain.
And it would be easier to finally implement a resource list method for every endpoint of the pokeAPI.
But I would like to hear what you guys have to say.
Do you think it's ok?
Thanks for the answer, @Naramsim!
I'm going to create a new branch and start developing there, whenever I have the time 😄
I thought about messing with pokebase, but both projects would require some major overhauls. And since I'm not that familiar with pokebase, going with pokepy was the easiest solution for me.
Go ahead whenever you want and take your time. See this as a learning experience.
Also, try to keep the module's APIs closer as much as possible to the ones already present. So people using the module won't have to change much in their code. Anyways, with the new code, we could release a major version so it's fine if some methods change.
then you can get access to the root endpoint. I noticed something though testing it out with your /machine root and noticed that it didn't work for it. It actually doesn't work for any root endpoints that have no name property for the objects. What I mean is, the root endpoint for /machine gives
Anyway, this is getting beyond the scope of this issue and I'll open an issue over there but I just wanted to say that pokebase does seem to have root endpoints.
Activity
Naramsim commentedon Dec 6, 2020
Hi @Kronopt,
I think you can go ahead and try developing a prototype (if you have time), maybe preserving the same APIs.
What do you think about https://github.com/PokeAPI/pokebase? Because if you wanna move towards the implementation made in that repository, you could just improve that one.
PS: I also think that both the Python wrappers should be able to query PokeAPI's root endpoints such as https://pokeapi.co/api/v2/machine/?offset=0&limit=200000
Kronopt commentedon Dec 6, 2020
Thanks for the answer, @Naramsim!
I'm going to create a new branch and start developing there, whenever I have the time 😄
I thought about messing with pokebase, but both projects would require some major overhauls. And since I'm not that familiar with pokebase, going with pokepy was the easiest solution for me.
As for the root endpoints,
That's what I meant with the "resource list method". It's on the TODO list
Naramsim commentedon Dec 6, 2020
Alright then :)
Go ahead whenever you want and take your time. See this as a learning experience.
Also, try to keep the module's APIs closer as much as possible to the ones already present. So people using the module won't have to change much in their code. Anyways, with the new code, we could release a major version so it's fine if some methods change.
C-Garza commentedon Dec 7, 2020
The pokebase wrapper does support root endpoints from what I can see. If you use something like:
then you can get access to the root endpoint. I noticed something though testing it out with your
/machineroot and noticed that it didn't work for it. It actually doesn't work for any root endpoints that have nonameproperty for the objects. What I mean is, the root endpoint for/machinegivesbut the
/pokemonendpoint does have anameproperty:Anyway, this is getting beyond the scope of this issue and I'll open an issue over there but I just wanted to say that pokebase does seem to have root endpoints.
phalt commentedon Dec 8, 2020
Happy to drop Beckett, it was an experiment for me and nothing more.