Skip to content

CommunityContent Routes

CommunityContentRouteInterface

Bases: ClientMixin

Source code in src/bungio/api/bungie/community_content.py
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
38
39
40
41
42
@custom_define()
class CommunityContentRouteInterface(ClientMixin):
    async def get_community_content(
        self,
        media_filter: Union[ForumTopicsCategoryFiltersEnum, int],
        page: int,
        sort: Union[CommunityContentSortMode, int],
        auth: Optional[AuthData] = None,
    ) -> PostSearchResponse:
        """
        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

        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_community_content(
            media_filter=getattr(media_filter, "value", media_filter),
            page=page,
            sort=getattr(sort, "value", sort),
            auth=auth,
        )
        return await PostSearchResponse.from_dict(
            data=response, client=self._client, media_filter=media_filter, page=page, sort=sort, auth=auth
        )

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

Returns community content.

Parameters:

Name Type Description Default
media_filter Union[ForumTopicsCategoryFiltersEnum, int]

The type of media to get

required
page int

Zero based page

required
sort Union[CommunityContentSortMode, 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

Returns:

Type Description
PostSearchResponse

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

Source code in src/bungio/api/bungie/community_content.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
async def get_community_content(
    self,
    media_filter: Union[ForumTopicsCategoryFiltersEnum, int],
    page: int,
    sort: Union[CommunityContentSortMode, int],
    auth: Optional[AuthData] = None,
) -> PostSearchResponse:
    """
    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

    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_community_content(
        media_filter=getattr(media_filter, "value", media_filter),
        page=page,
        sort=getattr(sort, "value", sort),
        auth=auth,
    )
    return await PostSearchResponse.from_dict(
        data=response, client=self._client, media_filter=media_filter, page=page, sort=sort, auth=auth
    )