Skip to content

Forums API Models

ForumFlagsEnum

Bases: BaseFlagEnum

No description given by bungie.

Source code in src/bungio/models/bungie/forums.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class ForumFlagsEnum(BaseFlagEnum):
    """
    _No description given by bungie._
    """

    NONE = 0
    """_No description given by bungie._ """
    BUNGIE_STAFF_POST = 1
    """_No description given by bungie._ """
    FORUM_NINJA_POST = 2
    """_No description given by bungie._ """
    FORUM_MENTOR_POST = 4
    """_No description given by bungie._ """
    TOPIC_BUNGIE_STAFF_POSTED = 8
    """_No description given by bungie._ """
    TOPIC_BUNGIE_VOLUNTEER_POSTED = 16
    """_No description given by bungie._ """
    QUESTION_ANSWERED_BY_BUNGIE = 32
    """_No description given by bungie._ """
    QUESTION_ANSWERED_BY_NINJA = 64
    """_No description given by bungie._ """
    COMMUNITY_CONTENT = 128
    """_No description given by bungie._ """

BUNGIE_STAFF_POST = 1 class-attribute instance-attribute

No description given by bungie.

COMMUNITY_CONTENT = 128 class-attribute instance-attribute

No description given by bungie.

FORUM_MENTOR_POST = 4 class-attribute instance-attribute

No description given by bungie.

FORUM_NINJA_POST = 2 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

QUESTION_ANSWERED_BY_BUNGIE = 32 class-attribute instance-attribute

No description given by bungie.

QUESTION_ANSWERED_BY_NINJA = 64 class-attribute instance-attribute

No description given by bungie.

TOPIC_BUNGIE_STAFF_POSTED = 8 class-attribute instance-attribute

No description given by bungie.

TOPIC_BUNGIE_VOLUNTEER_POSTED = 16 class-attribute instance-attribute

No description given by bungie.

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

ForumPostCategoryEnums

Bases: BaseFlagEnum

No description given by bungie.

Source code in src/bungio/models/bungie/forums.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class ForumPostCategoryEnums(BaseFlagEnum):
    """
    _No description given by bungie._
    """

    NONE = 0
    """_No description given by bungie._ """
    TEXT_ONLY = 1
    """_No description given by bungie._ """
    MEDIA = 2
    """_No description given by bungie._ """
    LINK = 4
    """_No description given by bungie._ """
    POLL = 8
    """_No description given by bungie._ """
    QUESTION = 16
    """_No description given by bungie._ """
    ANSWERED = 32
    """_No description given by bungie._ """
    ANNOUNCEMENT = 64
    """_No description given by bungie._ """
    CONTENT_COMMENT = 128
    """_No description given by bungie._ """
    BUNGIE_OFFICIAL = 256
    """_No description given by bungie._ """
    NINJA_OFFICIAL = 512
    """_No description given by bungie._ """
    RECRUITMENT = 1024
    """_No description given by bungie._ """

ANNOUNCEMENT = 64 class-attribute instance-attribute

No description given by bungie.

ANSWERED = 32 class-attribute instance-attribute

No description given by bungie.

BUNGIE_OFFICIAL = 256 class-attribute instance-attribute

No description given by bungie.

CONTENT_COMMENT = 128 class-attribute instance-attribute

No description given by bungie.

No description given by bungie.

MEDIA = 2 class-attribute instance-attribute

No description given by bungie.

NINJA_OFFICIAL = 512 class-attribute instance-attribute

No description given by bungie.

NONE = 0 class-attribute instance-attribute

No description given by bungie.

POLL = 8 class-attribute instance-attribute

No description given by bungie.

QUESTION = 16 class-attribute instance-attribute

No description given by bungie.

RECRUITMENT = 1024 class-attribute instance-attribute

No description given by bungie.

TEXT_ONLY = 1 class-attribute instance-attribute

No description given by bungie.

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