nxtlo / aiobungie

Python and asyncio Bungie API wrapper.
https://nxtlo.github.io/aiobungie/
MIT License
52 stars 10 forks source link

Bungie Entities. #12

Closed nxtlo closed 2 years ago

nxtlo commented 3 years ago

The Bungie entity flow is still in Beta but my implementation was this.

Almost all Definitions have a displayProperties which includes:

Each definition have different response, for an example the DestinyActivityDefinition has a:

so if the main Entity look like this:

@attr.define(...)
class Entity:
    name = ...
    has_icon = ...
    icon = ...
    description = ...

we're gonna have to design interfaces to the others. Like the activity definition will look like:

@attr.define(...)
class ActivityEntity(Entity):
    releaseTime = ...
    releaseIcon = ...
    pgcrImage = ...

and the season definition looks like this.

@attr.define(...)
class SeasonEntity(Entity):
    number = ...
    start_date = ...
    season_pass = ...

And this goes for all other definitions. This is just an implementation and will not be a part of 0.2.5 stable release yet. This will also completely replace the Manifest database methods and converts them to an actual entity objects.

nxtlo commented 2 years ago

We only included the definitions and entities we needed so closing this.