Skip to content

Streaming API Models

DropStateEnum

Bases: BaseEnum

No description given by bungie.

Source code in src/bungio/models/bungie/streaming.py
 9
10
11
12
13
14
15
16
17
18
19
class DropStateEnum(BaseEnum):
    """
    _No description given by bungie._
    """

    CLAIMED = 0
    """_No description given by bungie._ """
    APPLIED = 1
    """_No description given by bungie._ """
    FULFILLED = 2
    """_No description given by bungie._ """

APPLIED = 1 class-attribute instance-attribute

No description given by bungie.

CLAIMED = 0 class-attribute instance-attribute

No description given by bungie.

FULFILLED = 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