Skip to content

GlobalAlerts Routes

GlobalAlertsRouteInterface

Bases: ClientMixin

Source code in src/bungio/api/bungie/global_alerts.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@custom_define()
class GlobalAlertsRouteInterface(ClientMixin):
    async def get_global_alerts(
        self, includestreaming: Optional[bool] = None, auth: Optional[AuthData] = None
    ) -> list[GlobalAlert]:
        """
        Gets any active global alert for display in the forum banners, help pages, etc. Usually used for DOC alerts.

        Args:
            includestreaming: Determines whether Streaming Alerts are included in results
            auth: Authentication information. Required when users with a private profile are queried, or when Bungie feels like it

        Returns:
            The model which is returned by bungie. [General endpoint information.](https://bungie-net.github.io/multi/index.html)
        """

        response = await self._client.http.get_global_alerts(
            includestreaming=includestreaming if includestreaming is not None else None, auth=auth
        )
        return [
            await GlobalAlert.from_dict(data=value, client=self._client, includestreaming=includestreaming, auth=auth)
            for value in response["Response"]
        ]

get_global_alerts(includestreaming=None, auth=None) async

Gets any active global alert for display in the forum banners, help pages, etc. Usually used for DOC alerts.

Parameters:

Name Type Description Default
includestreaming Optional[bool]

Determines whether Streaming Alerts are included in results

None
auth Optional[AuthData]

Authentication information. Required when users with a private profile are queried, or when Bungie feels like it

None

Returns:

Type Description
list[GlobalAlert]

The model which is returned by bungie. General endpoint information.

Source code in src/bungio/api/bungie/global_alerts.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
async def get_global_alerts(
    self, includestreaming: Optional[bool] = None, auth: Optional[AuthData] = None
) -> list[GlobalAlert]:
    """
    Gets any active global alert for display in the forum banners, help pages, etc. Usually used for DOC alerts.

    Args:
        includestreaming: Determines whether Streaming Alerts are included in results
        auth: Authentication information. Required when users with a private profile are queried, or when Bungie feels like it

    Returns:
        The model which is returned by bungie. [General endpoint information.](https://bungie-net.github.io/multi/index.html)
    """

    response = await self._client.http.get_global_alerts(
        includestreaming=includestreaming if includestreaming is not None else None, auth=auth
    )
    return [
        await GlobalAlert.from_dict(data=value, client=self._client, includestreaming=includestreaming, auth=auth)
        for value in response["Response"]
    ]