Skip to content

CommunityContent HTTP Routes

CommunityContentRouteHttpRequests

Source code in bungio/http/routes/community_content.py
 7
 8
 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 CommunityContentRouteHttpRequests:
    request: Callable[..., Coroutine]

    async def get_community_content(
        self, media_filter: int, page: int, sort: int, auth: Optional[AuthData] = None, *args, **kwargs
    ) -> dict:
        """
        Returns community content.

        Args:
            media_filter: The type of media to get
            page: Zero based page
            sort: The sort mode.
            auth: Authentication information. Required when users with a private profile are queried, or when Bungie feels like it

        Raises:
            NotFound: 404 request
            BadRequest: 400 request
            InvalidAuthentication: If authentication is invalid
            TimeoutException: If no connection could be made
            BungieDead: Servers are down
            AuthenticationTooSlow: The authentication key has expired
            BungieException: Relaying the bungie error

        Returns:
            The json response
        """

        return await self.request(
            Route(path=f"/CommunityContent/Get/{sort}/{media_filter}/{page}/", method="GET", auth=auth)
        )

get_community_content(media_filter, page, sort, auth=None, args, kwargs) async

Returns community content.

Parameters:

Name Type Description Default
media_filter int

The type of media to get

required
page int

Zero based page

required
sort int

The sort mode.

required
auth Optional[AuthData]

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

None

Raises:

Type Description
NotFound

404 request

BadRequest

400 request

InvalidAuthentication

If authentication is invalid

TimeoutException

If no connection could be made

BungieDead

Servers are down

AuthenticationTooSlow

The authentication key has expired

BungieException

Relaying the bungie error

Returns:

Type Description
dict

The json response

Source code in bungio/http/routes/community_content.py
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
async def get_community_content(
    self, media_filter: int, page: int, sort: int, auth: Optional[AuthData] = None, *args, **kwargs
) -> dict:
    """
    Returns community content.

    Args:
        media_filter: The type of media to get
        page: Zero based page
        sort: The sort mode.
        auth: Authentication information. Required when users with a private profile are queried, or when Bungie feels like it

    Raises:
        NotFound: 404 request
        BadRequest: 400 request
        InvalidAuthentication: If authentication is invalid
        TimeoutException: If no connection could be made
        BungieDead: Servers are down
        AuthenticationTooSlow: The authentication key has expired
        BungieException: Relaying the bungie error

    Returns:
        The json response
    """

    return await self.request(
        Route(path=f"/CommunityContent/Get/{sort}/{media_filter}/{page}/", method="GET", auth=auth)
    )