leonhard-s / auraxium

A high-level Python wrapper for the PlanetSide 2 API.
https://auraxium.readthedocs.io/
MIT License
28 stars 8 forks source link

Reconsider object model getter helpers #45

Open leonhard-s opened 3 years ago

leonhard-s commented 3 years ago

Relational tables like characters_item are currently exposed via a provisional interface that effectively wraps a census.Query object with an anonymous **kwargs annotation. This makes them difficult to use, while still not featuring the full join capabilities of the underlying query.

Since this system was introduced, the URL generator has been promoted to be part of the main API. It would therefore be possible to just turn these into query factories, then have the user perform the request.

Alternatively, these methods need to be extended with useful argument types to make them easier to use. Users who want to use the lower-level Query interface can always generate a query to a given instance via the .query() factory and then join away as per the census module API.