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

Faction image_path missing #47

Closed dbrennand closed 3 years ago

dbrennand commented 3 years ago

Hi there👋🏻

In the tests API response for faction.json I can see that image_path should be present however, I'm not receiving a value for it from the API.

Can anyone replicate this?

My code:

    async with auraxium.Client() as client:
        # Get Character object
        player = await client.get_by_name(auraxium.ps2.Character, "Player")
        faction = await player.faction()
        print(faction.data)
        # image_path is not present in the data.

The response data missing image_path:

faction_id=1 name=LocaleData(de='Vanu-Souveränität', en='Vanu Sovereignty', es='Soberanía Vanu', fr='Souveraineté Vanu', it='Sovranità Vanu') code_tag='VS' user_selectable=True
leonhard-s commented 3 years ago

Hi, thanks for the report!

Can confirm, these fields are currently missing. These image-specific fields are defined in a separate mix-in class, whose fields are not being added properly. This is a regression introduced when I switched from Python dataclasses to pydantic models.

I started a PR that should resolve this, should be a quick fix.