Skip to content

Definitions API Models

DestinyActivityModeType

Bases: BaseEnum

For historical reasons, this list will have both D1 and D2-relevant Activity Modes in it. Please don't take this to mean that some D1-only feature is coming back!

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
class DestinyActivityModeType(BaseEnum):
    """
    For historical reasons, this list will have both D1 and D2-relevant Activity Modes in it. Please don't take this to mean that some D1-only feature is coming back!
    """

    NONE = 0
    """_No description given by bungie._ """
    STORY = 2
    """_No description given by bungie._ """
    STRIKE = 3
    """_No description given by bungie._ """
    RAID = 4
    """_No description given by bungie._ """
    ALL_PV_P = 5
    """_No description given by bungie._ """
    PATROL = 6
    """_No description given by bungie._ """
    ALL_PV_E = 7
    """_No description given by bungie._ """
    RESERVED9 = 9
    """_No description given by bungie._ """
    CONTROL = 10
    """_No description given by bungie._ """
    RESERVED11 = 11
    """_No description given by bungie._ """
    CLASH = 12
    """Clash -> Destiny's name for Team Deathmatch. 4v4 combat, the team with the highest kills at the end of time wins. """
    RESERVED13 = 13
    """_No description given by bungie._ """
    CRIMSON_DOUBLES = 15
    """_No description given by bungie._ """
    NIGHTFALL = 16
    """_No description given by bungie._ """
    HEROIC_NIGHTFALL = 17
    """_No description given by bungie._ """
    ALL_STRIKES = 18
    """_No description given by bungie._ """
    IRON_BANNER = 19
    """_No description given by bungie._ """
    RESERVED20 = 20
    """_No description given by bungie._ """
    RESERVED21 = 21
    """_No description given by bungie._ """
    RESERVED22 = 22
    """_No description given by bungie._ """
    RESERVED24 = 24
    """_No description given by bungie._ """
    ALL_MAYHEM = 25
    """_No description given by bungie._ """
    RESERVED26 = 26
    """_No description given by bungie._ """
    RESERVED27 = 27
    """_No description given by bungie._ """
    RESERVED28 = 28
    """_No description given by bungie._ """
    RESERVED29 = 29
    """_No description given by bungie._ """
    RESERVED30 = 30
    """_No description given by bungie._ """
    SUPREMACY = 31
    """_No description given by bungie._ """
    PRIVATE_MATCHES_ALL = 32
    """_No description given by bungie._ """
    SURVIVAL = 37
    """_No description given by bungie._ """
    COUNTDOWN = 38
    """_No description given by bungie._ """
    TRIALS_OF_THE_NINE = 39
    """_No description given by bungie._ """
    SOCIAL = 40
    """_No description given by bungie._ """
    TRIALS_COUNTDOWN = 41
    """_No description given by bungie._ """
    TRIALS_SURVIVAL = 42
    """_No description given by bungie._ """
    IRON_BANNER_CONTROL = 43
    """_No description given by bungie._ """
    IRON_BANNER_CLASH = 44
    """_No description given by bungie._ """
    IRON_BANNER_SUPREMACY = 45
    """_No description given by bungie._ """
    SCORED_NIGHTFALL = 46
    """_No description given by bungie._ """
    SCORED_HEROIC_NIGHTFALL = 47
    """_No description given by bungie._ """
    RUMBLE = 48
    """_No description given by bungie._ """
    ALL_DOUBLES = 49
    """_No description given by bungie._ """
    DOUBLES = 50
    """_No description given by bungie._ """
    PRIVATE_MATCHES_CLASH = 51
    """_No description given by bungie._ """
    PRIVATE_MATCHES_CONTROL = 52
    """_No description given by bungie._ """
    PRIVATE_MATCHES_SUPREMACY = 53
    """_No description given by bungie._ """
    PRIVATE_MATCHES_COUNTDOWN = 54
    """_No description given by bungie._ """
    PRIVATE_MATCHES_SURVIVAL = 55
    """_No description given by bungie._ """
    PRIVATE_MATCHES_MAYHEM = 56
    """_No description given by bungie._ """
    PRIVATE_MATCHES_RUMBLE = 57
    """_No description given by bungie._ """
    HEROIC_ADVENTURE = 58
    """_No description given by bungie._ """
    SHOWDOWN = 59
    """_No description given by bungie._ """
    LOCKDOWN = 60
    """_No description given by bungie._ """
    SCORCHED = 61
    """_No description given by bungie._ """
    SCORCHED_TEAM = 62
    """_No description given by bungie._ """
    GAMBIT = 63
    """_No description given by bungie._ """
    ALL_PV_E_COMPETITIVE = 64
    """_No description given by bungie._ """
    BREAKTHROUGH = 65
    """_No description given by bungie._ """
    BLACK_ARMORY_RUN = 66
    """_No description given by bungie._ """
    SALVAGE = 67
    """_No description given by bungie._ """
    IRON_BANNER_SALVAGE = 68
    """_No description given by bungie._ """
    PV_P_COMPETITIVE = 69
    """_No description given by bungie._ """
    PV_P_QUICKPLAY = 70
    """_No description given by bungie._ """
    CLASH_QUICKPLAY = 71
    """_No description given by bungie._ """
    CLASH_COMPETITIVE = 72
    """_No description given by bungie._ """
    CONTROL_QUICKPLAY = 73
    """_No description given by bungie._ """
    CONTROL_COMPETITIVE = 74
    """_No description given by bungie._ """
    GAMBIT_PRIME = 75
    """_No description given by bungie._ """
    RECKONING = 76
    """_No description given by bungie._ """
    MENAGERIE = 77
    """_No description given by bungie._ """
    VEX_OFFENSIVE = 78
    """_No description given by bungie._ """
    NIGHTMARE_HUNT = 79
    """_No description given by bungie._ """
    ELIMINATION = 80
    """_No description given by bungie._ """
    MOMENTUM = 81
    """_No description given by bungie._ """
    DUNGEON = 82
    """_No description given by bungie._ """
    SUNDIAL = 83
    """_No description given by bungie._ """
    TRIALS_OF_OSIRIS = 84
    """_No description given by bungie._ """
    DARES = 85
    """_No description given by bungie._ """
    OFFENSIVE = 86
    """_No description given by bungie._ """
    LOST_SECTOR = 87
    """_No description given by bungie._ """
    RIFT = 88
    """_No description given by bungie._ """
    ZONE_CONTROL = 89
    """_No description given by bungie._ """
    IRON_BANNER_RIFT = 90
    """_No description given by bungie._ """
    IRON_BANNER_ZONE_CONTROL = 91
    """_No description given by bungie._ """
    RELIC = 92
    """_No description given by bungie._ """
    LAWLESS_FRONTIER = 93
    """_No description given by bungie._ """

ALL_DOUBLES = 49 class-attribute instance-attribute

No description given by bungie.

ALL_MAYHEM = 25 class-attribute instance-attribute

No description given by bungie.

ALL_PV_E = 7 class-attribute instance-attribute

No description given by bungie.

ALL_PV_E_COMPETITIVE = 64 class-attribute instance-attribute

No description given by bungie.

ALL_PV_P = 5 class-attribute instance-attribute

No description given by bungie.

ALL_STRIKES = 18 class-attribute instance-attribute

No description given by bungie.

BLACK_ARMORY_RUN = 66 class-attribute instance-attribute

No description given by bungie.

BREAKTHROUGH = 65 class-attribute instance-attribute

No description given by bungie.

CLASH = 12 class-attribute instance-attribute

Clash -> Destiny's name for Team Deathmatch. 4v4 combat, the team with the highest kills at the end of time wins.

CLASH_COMPETITIVE = 72 class-attribute instance-attribute

No description given by bungie.

CLASH_QUICKPLAY = 71 class-attribute instance-attribute

No description given by bungie.

CONTROL = 10 class-attribute instance-attribute

No description given by bungie.

CONTROL_COMPETITIVE = 74 class-attribute instance-attribute

No description given by bungie.

CONTROL_QUICKPLAY = 73 class-attribute instance-attribute

No description given by bungie.

COUNTDOWN = 38 class-attribute instance-attribute

No description given by bungie.

CRIMSON_DOUBLES = 15 class-attribute instance-attribute

No description given by bungie.

DARES = 85 class-attribute instance-attribute

No description given by bungie.

DOUBLES = 50 class-attribute instance-attribute

No description given by bungie.

DUNGEON = 82 class-attribute instance-attribute

No description given by bungie.

ELIMINATION = 80 class-attribute instance-attribute

No description given by bungie.

GAMBIT = 63 class-attribute instance-attribute

No description given by bungie.

GAMBIT_PRIME = 75 class-attribute instance-attribute

No description given by bungie.

HEROIC_ADVENTURE = 58 class-attribute instance-attribute

No description given by bungie.

HEROIC_NIGHTFALL = 17 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER = 19 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_CLASH = 44 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_CONTROL = 43 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_RIFT = 90 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_SALVAGE = 68 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_SUPREMACY = 45 class-attribute instance-attribute

No description given by bungie.

IRON_BANNER_ZONE_CONTROL = 91 class-attribute instance-attribute

No description given by bungie.

LAWLESS_FRONTIER = 93 class-attribute instance-attribute

No description given by bungie.

LOCKDOWN = 60 class-attribute instance-attribute

No description given by bungie.

LOST_SECTOR = 87 class-attribute instance-attribute

No description given by bungie.

MENAGERIE = 77 class-attribute instance-attribute

No description given by bungie.

MOMENTUM = 81 class-attribute instance-attribute

No description given by bungie.

NIGHTFALL = 16 class-attribute instance-attribute

No description given by bungie.

NIGHTMARE_HUNT = 79 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

OFFENSIVE = 86 class-attribute instance-attribute

No description given by bungie.

PATROL = 6 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_ALL = 32 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_CLASH = 51 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_CONTROL = 52 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_COUNTDOWN = 54 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_MAYHEM = 56 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_RUMBLE = 57 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_SUPREMACY = 53 class-attribute instance-attribute

No description given by bungie.

PRIVATE_MATCHES_SURVIVAL = 55 class-attribute instance-attribute

No description given by bungie.

PV_P_COMPETITIVE = 69 class-attribute instance-attribute

No description given by bungie.

PV_P_QUICKPLAY = 70 class-attribute instance-attribute

No description given by bungie.

RAID = 4 class-attribute instance-attribute

No description given by bungie.

RECKONING = 76 class-attribute instance-attribute

No description given by bungie.

RELIC = 92 class-attribute instance-attribute

No description given by bungie.

RESERVED11 = 11 class-attribute instance-attribute

No description given by bungie.

RESERVED13 = 13 class-attribute instance-attribute

No description given by bungie.

RESERVED20 = 20 class-attribute instance-attribute

No description given by bungie.

RESERVED21 = 21 class-attribute instance-attribute

No description given by bungie.

RESERVED22 = 22 class-attribute instance-attribute

No description given by bungie.

RESERVED24 = 24 class-attribute instance-attribute

No description given by bungie.

RESERVED26 = 26 class-attribute instance-attribute

No description given by bungie.

RESERVED27 = 27 class-attribute instance-attribute

No description given by bungie.

RESERVED28 = 28 class-attribute instance-attribute

No description given by bungie.

RESERVED29 = 29 class-attribute instance-attribute

No description given by bungie.

RESERVED30 = 30 class-attribute instance-attribute

No description given by bungie.

RESERVED9 = 9 class-attribute instance-attribute

No description given by bungie.

RIFT = 88 class-attribute instance-attribute

No description given by bungie.

RUMBLE = 48 class-attribute instance-attribute

No description given by bungie.

SALVAGE = 67 class-attribute instance-attribute

No description given by bungie.

SCORCHED = 61 class-attribute instance-attribute

No description given by bungie.

SCORCHED_TEAM = 62 class-attribute instance-attribute

No description given by bungie.

SCORED_HEROIC_NIGHTFALL = 47 class-attribute instance-attribute

No description given by bungie.

SCORED_NIGHTFALL = 46 class-attribute instance-attribute

No description given by bungie.

SHOWDOWN = 59 class-attribute instance-attribute

No description given by bungie.

SOCIAL = 40 class-attribute instance-attribute

No description given by bungie.

STORY = 2 class-attribute instance-attribute

No description given by bungie.

STRIKE = 3 class-attribute instance-attribute

No description given by bungie.

SUNDIAL = 83 class-attribute instance-attribute

No description given by bungie.

SUPREMACY = 31 class-attribute instance-attribute

No description given by bungie.

SURVIVAL = 37 class-attribute instance-attribute

No description given by bungie.

TRIALS_COUNTDOWN = 41 class-attribute instance-attribute

No description given by bungie.

TRIALS_OF_OSIRIS = 84 class-attribute instance-attribute

No description given by bungie.

TRIALS_OF_THE_NINE = 39 class-attribute instance-attribute

No description given by bungie.

TRIALS_SURVIVAL = 42 class-attribute instance-attribute

No description given by bungie.

VEX_OFFENSIVE = 78 class-attribute instance-attribute

No description given by bungie.

ZONE_CONTROL = 89 class-attribute instance-attribute

No description given by bungie.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value

DestinyHistoricalStatsDefinition

Bases: ManifestModel

No description given by bungie.

Manifest Information

This model has some attributes which can be filled with additional information found in the manifest (manifest_...). Without additional work, these attributes will be None, since they require additional requests and database lookups.

To fill the manifest dependent attributes, either:

  • Run await ThisClass.fetch_manifest_information(), see here
  • Set Client.always_return_manifest_information to True, see here

Attributes:

Name Type Description
category Union[DestinyStatsCategoryType, int]

Category for the stat.

group Union[DestinyStatsGroupType, int]

Statistic group

icon_image str

Optional URI to an icon for the statistic

medal_tier_hash int

The tier associated with this medal - be it implicitly or explicitly.

merge_method Union[DestinyStatsMergeMethod, int]

Optional icon for the statistic

modes list[Union[DestinyActivityModeType, int]]

Game modes where this statistic can be reported.

period_types list[Union[PeriodType, int]]

Time periods the statistic covers

stat_description str

Description of a stat if applicable.

stat_id str

Unique programmer friendly ID for this stat

stat_name str

Display name

stat_name_abbr str

Display name abbreviated

unit_label str

Localized Unit Name for the stat.

unit_type Union[UnitType, int]

Unit, if any, for the statistic

weight int

Weight assigned to this stat indicating its relative impressiveness.

manifest_medal_tier_hash Optional[DestinyMedalTierDefinition]

Manifest information for medal_tier_hash

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
@custom_define()
class DestinyHistoricalStatsDefinition(ManifestModel):
    """
    _No description given by bungie._

    Tip: Manifest Information
        This model has some attributes which can be filled with additional information found in the manifest (`manifest_...`).
        Without additional work, these attributes will be `None`, since they require additional requests and database lookups.

        To fill the manifest dependent attributes, either:

        - Run `await ThisClass.fetch_manifest_information()`, see [here](/API Reference/Models/base)
        - Set `Client.always_return_manifest_information` to `True`, see [here](/API Reference/client)

    Attributes:
        category: Category for the stat.
        group: Statistic group
        icon_image: Optional URI to an icon for the statistic
        medal_tier_hash: The tier associated with this medal - be it implicitly or explicitly.
        merge_method: Optional icon for the statistic
        modes: Game modes where this statistic can be reported.
        period_types: Time periods the statistic covers
        stat_description: Description of a stat if applicable.
        stat_id: Unique programmer friendly ID for this stat
        stat_name: Display name
        stat_name_abbr: Display name abbreviated
        unit_label: Localized Unit Name for the stat.
        unit_type: Unit, if any, for the statistic
        weight: Weight assigned to this stat indicating its relative impressiveness.
        manifest_medal_tier_hash: Manifest information for `medal_tier_hash`
    """

    category: Union["DestinyStatsCategoryType", int] = custom_field(
        converter=enum_converter("DestinyStatsCategoryType")
    )
    group: Union["DestinyStatsGroupType", int] = custom_field(converter=enum_converter("DestinyStatsGroupType"))
    icon_image: str = custom_field()
    medal_tier_hash: int = custom_field()
    merge_method: Union["DestinyStatsMergeMethod", int] = custom_field(
        converter=enum_converter("DestinyStatsMergeMethod")
    )
    modes: list[Union["DestinyActivityModeType", int]] = custom_field(
        converter=enum_converter("DestinyActivityModeType")
    )
    period_types: list[Union["PeriodType", int]] = custom_field(converter=enum_converter("PeriodType"))
    stat_description: str = custom_field()
    stat_id: str = custom_field()
    stat_name: str = custom_field()
    stat_name_abbr: str = custom_field()
    unit_label: str = custom_field()
    unit_type: Union["UnitType", int] = custom_field(converter=enum_converter("UnitType"))
    weight: int = custom_field()
    manifest_medal_tier_hash: Optional["DestinyMedalTierDefinition"] = custom_field(default=None)

_convert_to_bungie_case(string) cached staticmethod

Convert a string to how it is represented by bungie: my_name_string -> myNameString

Parameters:

Name Type Description Default
string str

The og string

required

Returns:

Type Description
str

The bungie string

Source code in src/bungio/models/base.py
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
@staticmethod
@functools.cache
def _convert_to_bungie_case(string: str) -> str:
    """
    Convert a string to how it is represented by bungie: my_name_string -> myNameString

    Args:
        string: The og string

    Returns:
        The bungie string
    """

    if "_" not in string:
        return string
    else:
        split = string.split("_")
        return "".join((split[0], *(s.capitalize() for s in split[1:])))

fetch_manifest_information(include=None, exclude=None, _cache=None) async

Fill the model in-place with information from the manifest.

Example

Fill every attribute

1
2
3
4
model: DestinyHistoricalStatsActivity
await model.fetch_manifest_information()
assert model.manifest_director_activity_hash is not None
assert model.manifest_reference_id is not None

Fill only some attribute

1
2
3
4
model: DestinyHistoricalStatsActivity
await model.fetch_manifest_information(include=["manifest_director_activity_hash"])
assert model.manifest_director_activity_hash is not None
assert model.manifest_reference_id is None
1
2
3
4
model: DestinyHistoricalStatsActivity
await model.fetch_manifest_information(exclude=["manifest_director_activity_hash"])
assert model.manifest_director_activity_hash is None
assert model.manifest_reference_id is not None

Parameters:

Name Type Description Default
include Optional[list[str]]

A list of attributes you want to include. Excludes everything not mentioned

None
exclude Optional[list[str]]

A list of attributes you want to exclude. Includes everything not mentioned

None
Source code in src/bungio/models/base.py
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
async def fetch_manifest_information(
    self, include: Optional[list[str]] = None, exclude: Optional[list[str]] = None, _cache: Optional[dict] = None
):
    """
    Fill the model in-place with information from the manifest.

    Example:
        Fill every attribute
        ```py
        model: DestinyHistoricalStatsActivity
        await model.fetch_manifest_information()
        assert model.manifest_director_activity_hash is not None
        assert model.manifest_reference_id is not None
        ```

        Fill only some attribute
        ```py
        model: DestinyHistoricalStatsActivity
        await model.fetch_manifest_information(include=["manifest_director_activity_hash"])
        assert model.manifest_director_activity_hash is not None
        assert model.manifest_reference_id is None
        ```
        ```py
        model: DestinyHistoricalStatsActivity
        await model.fetch_manifest_information(exclude=["manifest_director_activity_hash"])
        assert model.manifest_director_activity_hash is None
        assert model.manifest_reference_id is not None
        ```

    Args:
        include: A list of attributes you want to include. Excludes everything not mentioned
        exclude:  A list of attributes you want to exclude. Includes everything not mentioned
    """

    if not isinstance(self._client.manifest_storage, AsyncEngine):
        raise ValueError("Client.manifest_storage must be set up to use this")

    if not _cache:
        _cache = {}

    class_definition = attrs.fields_dict(type(self))  # noqa

    # loop through the class attributes
    for name in self.__dir__():
        if name.startswith("__"):
            continue

        if include and name not in include:
            continue
        if exclude and name in exclude:
            continue

        # manifest entries
        if name.startswith("manifest_"):
            striped_name = name.removeprefix("manifest_")
            value = getattr(self, striped_name)

            if value is MISSING:
                return

            # check the cache to avoid infinite recursion
            if cached := _cache.get(value, None):
                manifest_value = cached

            else:
                attr_definition = class_definition[name]
                manifest_class_name = attr_definition.type.__str__().removesuffix("')]").split("'")[-1]
                manifest_value = await self._client.manifest.fetch(
                    manifest_class=getattr(models, manifest_class_name), value=value
                )

                _cache[value] = manifest_value

                # check if the model has manifest models itself
                if manifest_value:
                    await manifest_value.fetch_manifest_information(_cache=_cache)

            setattr(self, name, manifest_value)

        # sub models which may have manifest entries too
        elif hasattr((value := getattr(self, name)), "fetch_manifest_information"):
            await value.fetch_manifest_information(_cache=_cache)

from_dict(data, client, recursive=False, *args, **kwargs) async classmethod

Convert json data to this model

Parameters:

Name Type Description Default
data dict

The json representation of the model, usually received by bungie

required
client 'Client'

The client obj

required
recursive bool

If this was called recursively

False

Returns:

Type Description
BaseModel

The model

Source code in src/bungio/models/base.py
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
@classmethod
async def from_dict(cls, data: dict, client: "Client", recursive: bool = False, *args, **kwargs) -> BaseModel:
    """
    Convert json data to this model

    Args:
        data: The json representation of the model, usually received by bungie
        client: The client obj
        recursive: If this was called recursively

    Returns:
        The model
    """

    if isinstance(data, cls):
        return data

    if not isinstance(data, dict):
        raise ValueError

    if "Response" in data:
        data = data["Response"]

    # also use the kwargs as data
    data = kwargs | data
    data = cls.process_dict(data=data, client=client)

    prepared = {}
    for name, field in attrs.fields_dict(cls).items():
        if field.init and name != "_client":
            default = field.default

            # get the value we want. This also skips the manifest_... entries since they have no value and a default
            bungie_name = cls._convert_to_bungie_case(name)
            value = data.get(bungie_name, attrs.NOTHING)

            # bungie is veeery inconsistent and sometimes like to start their params with an upper case for some reason
            # only sometimes tho :)
            if value is attrs.NOTHING:
                value = data.get(f"{bungie_name[0].capitalize()}{bungie_name[1:]}", attrs.NOTHING)

            # sadly bungie sometimes does not return info without marking that fact in the api specs
            if value is attrs.NOTHING and default is attrs.NOTHING:
                default = MISSING

            if value is attrs.NOTHING:
                value = default

            else:
                value = await cls._convert_to_type(
                    field_type=field.type, field_metadata=field.metadata, value=value, client=client
                )

            # set the attr
            prepared[name] = value

    res = cls(**prepared)  # noqa

    # fill the manifest information
    if not recursive and res._client.always_return_manifest_information:
        await res.fetch_manifest_information()

    return res

process_dict(data, client, *args, **kwargs) staticmethod

Model specific cleanup

Parameters:

Name Type Description Default
data dict

The json representation of the model, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
dict

Clean json

Source code in src/bungio/models/base.py
260
261
262
263
264
265
266
267
268
269
270
271
272
@staticmethod
def process_dict(data: dict, client: "Client", *args, **kwargs) -> dict:
    """
    Model specific cleanup

    Args:
        data: The json representation of the model, usually received by bungie
        client: The client obj

    Returns:
        Clean json
    """
    return data

to_dict(_return_to_bungie_case=True)

Convert the model into a dict representation bungie accepts

Returns:

Type Description
dict

A dict which can be sent to bungie

Source code in src/bungio/models/base.py
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
def to_dict(self, _return_to_bungie_case: bool = True) -> dict:
    """
    Convert the model into a dict representation bungie accepts

    Returns:
        A dict which can be sent to bungie
    """

    result = {}

    for name, field in attrs.fields_dict(type(self)).items():
        if name.startswith("_") or name.startswith("manifest_"):
            continue

        value = getattr(self, name)
        if _return_to_bungie_case:
            name = self._convert_to_bungie_case(name)

        if inspect.ismethod(value) or inspect.isfunction(value):
            continue

        elif isinstance(value, dict):
            raise NotImplementedError(
                "Nested dict conversion is not currently implemented, since bungie does never require that info"
            )

        elif isinstance(value, list):
            list_results = []
            for entry in value:
                if hasattr(entry, "to_dict"):
                    list_results.append(entry.to_dict())
                else:
                    list_results.append(entry)

            result[name] = list_results

        else:
            if hasattr(value, "to_dict"):
                result[name] = value.to_dict()
            else:
                # convert to string if they are int64
                if field.metadata.get("int64", None) is True:
                    value = str(value)

                result[name] = value

    return result

DestinyStatsCategoryType

Bases: BaseEnum

No description given by bungie.

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
class DestinyStatsCategoryType(BaseEnum):
    """
    _No description given by bungie._
    """

    NONE = 0
    """_No description given by bungie._ """
    KILLS = 1
    """_No description given by bungie._ """
    ASSISTS = 2
    """_No description given by bungie._ """
    DEATHS = 3
    """_No description given by bungie._ """
    CRITICALS = 4
    """_No description given by bungie._ """
    K_DA = 5
    """_No description given by bungie._ """
    K_D = 6
    """_No description given by bungie._ """
    SCORE = 7
    """_No description given by bungie._ """
    ENTERED = 8
    """_No description given by bungie._ """
    TIME_PLAYED = 9
    """_No description given by bungie._ """
    MEDAL_WINS = 10
    """_No description given by bungie._ """
    MEDAL_GAME = 11
    """_No description given by bungie._ """
    MEDAL_SPECIAL_KILLS = 12
    """_No description given by bungie._ """
    MEDAL_SPREES = 13
    """_No description given by bungie._ """
    MEDAL_MULTI_KILLS = 14
    """_No description given by bungie._ """
    MEDAL_ABILITIES = 15
    """_No description given by bungie._ """

ASSISTS = 2 class-attribute instance-attribute

No description given by bungie.

CRITICALS = 4 class-attribute instance-attribute

No description given by bungie.

DEATHS = 3 class-attribute instance-attribute

No description given by bungie.

ENTERED = 8 class-attribute instance-attribute

No description given by bungie.

KILLS = 1 class-attribute instance-attribute

No description given by bungie.

K_D = 6 class-attribute instance-attribute

No description given by bungie.

K_DA = 5 class-attribute instance-attribute

No description given by bungie.

MEDAL_ABILITIES = 15 class-attribute instance-attribute

No description given by bungie.

MEDAL_GAME = 11 class-attribute instance-attribute

No description given by bungie.

MEDAL_MULTI_KILLS = 14 class-attribute instance-attribute

No description given by bungie.

MEDAL_SPECIAL_KILLS = 12 class-attribute instance-attribute

No description given by bungie.

MEDAL_SPREES = 13 class-attribute instance-attribute

No description given by bungie.

MEDAL_WINS = 10 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

SCORE = 7 class-attribute instance-attribute

No description given by bungie.

TIME_PLAYED = 9 class-attribute instance-attribute

No description given by bungie.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value

DestinyStatsGroupType

Bases: BaseEnum

If the enum value is > 100, it is a "special" group that cannot be queried for directly (special cases apply to when they are returned, and are not relevant in general cases)

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
class DestinyStatsGroupType(BaseEnum):
    """
    If the enum value is > 100, it is a "special" group that cannot be queried for directly (special cases apply to when they are returned, and are not relevant in general cases)
    """

    NONE = 0
    """_No description given by bungie._ """
    GENERAL = 1
    """_No description given by bungie._ """
    WEAPONS = 2
    """_No description given by bungie._ """
    MEDALS = 3
    """_No description given by bungie._ """
    RESERVED_GROUPS = 100
    """This is purely to serve as the dividing line between filterable and un-filterable groups. Below this number is a group you can pass as a filter. Above it are groups used in very specific circumstances and not relevant for filtering. """
    LEADERBOARD = 101
    """Only applicable while generating leaderboards. """
    ACTIVITY = 102
    """These will *only* be consumed by GetAggregateStatsByActivity """
    UNIQUE_WEAPON = 103
    """These are only consumed and returned by GetUniqueWeaponHistory """
    INTERNAL = 104
    """_No description given by bungie._ """

ACTIVITY = 102 class-attribute instance-attribute

These will only be consumed by GetAggregateStatsByActivity

GENERAL = 1 class-attribute instance-attribute

No description given by bungie.

INTERNAL = 104 class-attribute instance-attribute

No description given by bungie.

LEADERBOARD = 101 class-attribute instance-attribute

Only applicable while generating leaderboards.

MEDALS = 3 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

RESERVED_GROUPS = 100 class-attribute instance-attribute

This is purely to serve as the dividing line between filterable and un-filterable groups. Below this number is a group you can pass as a filter. Above it are groups used in very specific circumstances and not relevant for filtering.

UNIQUE_WEAPON = 103 class-attribute instance-attribute

These are only consumed and returned by GetUniqueWeaponHistory

WEAPONS = 2 class-attribute instance-attribute

No description given by bungie.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value

DestinyStatsMergeMethod

Bases: BaseEnum

No description given by bungie.

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
347
348
349
350
351
352
353
354
355
356
357
class DestinyStatsMergeMethod(BaseEnum):
    """
    _No description given by bungie._
    """

    ADD = 0
    """When collapsing multiple instances of the stat together, add the values. """
    MIN = 1
    """When collapsing multiple instances of the stat together, take the lower value. """
    MAX = 2
    """When collapsing multiple instances of the stat together, take the higher value. """

ADD = 0 class-attribute instance-attribute

When collapsing multiple instances of the stat together, add the values.

MAX = 2 class-attribute instance-attribute

When collapsing multiple instances of the stat together, take the higher value.

MIN = 1 class-attribute instance-attribute

When collapsing multiple instances of the stat together, take the lower value.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value

PeriodType

Bases: BaseEnum

No description given by bungie.

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
360
361
362
363
364
365
366
367
368
369
370
371
372
class PeriodType(BaseEnum):
    """
    _No description given by bungie._
    """

    NONE = 0
    """_No description given by bungie._ """
    DAILY = 1
    """_No description given by bungie._ """
    ALL_TIME = 2
    """_No description given by bungie._ """
    ACTIVITY = 3
    """_No description given by bungie._ """

ACTIVITY = 3 class-attribute instance-attribute

No description given by bungie.

ALL_TIME = 2 class-attribute instance-attribute

No description given by bungie.

DAILY = 1 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value

UnitType

Bases: BaseEnum

No description given by bungie.

Source code in src/bungio/models/bungie/destiny/historicalstats/definitions.py
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
class UnitType(BaseEnum):
    """
    _No description given by bungie._
    """

    NONE = 0
    """_No description given by bungie._ """
    COUNT = 1
    """Indicates the statistic is a simple count of something. """
    PER_GAME = 2
    """Indicates the statistic is a per game average. """
    SECONDS = 3
    """Indicates the number of seconds """
    POINTS = 4
    """Indicates the number of points earned """
    TEAM = 5
    """Values represents a team ID """
    DISTANCE = 6
    """Values represents a distance (units to-be-determined) """
    PERCENT = 7
    """Ratio represented as a whole value from 0 to 100. """
    RATIO = 8
    """Ratio of something, shown with decimal places """
    BOOLEAN = 9
    """True or false """
    WEAPON_TYPE = 10
    """The stat is actually a weapon type. """
    STANDING = 11
    """Indicates victory, defeat, or something in between. """
    MILLISECONDS = 12
    """Number of milliseconds some event spanned. For example, race time, or lap time. """
    COMPLETION_REASON = 13
    """The value is a enumeration of the Completion Reason type. """

BOOLEAN = 9 class-attribute instance-attribute

True or false

COMPLETION_REASON = 13 class-attribute instance-attribute

The value is a enumeration of the Completion Reason type.

COUNT = 1 class-attribute instance-attribute

Indicates the statistic is a simple count of something.

DISTANCE = 6 class-attribute instance-attribute

Values represents a distance (units to-be-determined)

MILLISECONDS = 12 class-attribute instance-attribute

Number of milliseconds some event spanned. For example, race time, or lap time.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

PERCENT = 7 class-attribute instance-attribute

Ratio represented as a whole value from 0 to 100.

PER_GAME = 2 class-attribute instance-attribute

Indicates the statistic is a per game average.

POINTS = 4 class-attribute instance-attribute

Indicates the number of points earned

RATIO = 8 class-attribute instance-attribute

Ratio of something, shown with decimal places

SECONDS = 3 class-attribute instance-attribute

Indicates the number of seconds

STANDING = 11 class-attribute instance-attribute

Indicates victory, defeat, or something in between.

TEAM = 5 class-attribute instance-attribute

Values represents a team ID

WEAPON_TYPE = 10 class-attribute instance-attribute

The stat is actually a weapon type.

display_name property

Format the instance name so that it looks like in-game.

Example

name="HAND_CANNON" -> "Hand Cannon"

Returns:

Type Description
str

The formatted name

from_dict(data, client, *args, **kwargs) async classmethod

Convert data to this enum

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
EnumMixin | UnknownEnumValue

The enum

Source code in src/bungio/models/base.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@classmethod
async def from_dict(cls, data: int | str, client: "Client", *args, **kwargs) -> EnumMixin | UnknownEnumValue:
    """
    Convert data to this enum

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        The enum
    """

    if isinstance(data, cls):
        return data

    data = cls.process_dict(data=data, client=client)

    # catch unknown values
    try:
        return cls(data)
    except ValueError:
        return UnknownEnumValue(value=data, enum=cls)

process_dict(data, client, *args, **kwargs) staticmethod

Enum specific cleanup

Parameters:

Name Type Description Default
data int | str

The int / str representation of the enum, usually received by bungie

required
client 'Client'

The client obj

required

Returns:

Type Description
int | str

Clean int / str representation

Source code in src/bungio/models/base.py
134
135
136
137
138
139
140
141
142
143
144
145
146
@staticmethod
def process_dict(data: int | str, client: "Client", *args, **kwargs) -> int | str:
    """
    Enum specific cleanup

    Args:
        data: The int / str representation of the enum, usually received by bungie
        client: The client obj

    Returns:
        Clean int / str representation
    """
    return data

to_dict()

Convert the enum into a representation bungie accepts

Returns:

Type Description
Any

The value which can be sent to bungie

Source code in src/bungio/models/base.py
172
173
174
175
176
177
178
179
180
def to_dict(self) -> Any:
    """
    Convert the enum into a representation bungie accepts

    Returns:
        The value which can be sent to bungie
    """

    return self.value