Skip to content

Trending HTTP Routes

TrendingRouteHttpRequests

Source code in src/bungio/http/routes/trending.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
class TrendingRouteHttpRequests:
    request: Callable[..., Coroutine]

    async def get_trending_categories(self, auth: Optional[AuthData] = None, *args, **kwargs) -> dict:
        """
        Returns trending items for Bungie.net, collapsed into the first page of items per category. For pagination within a category, call GetTrendingCategory.

        Args:
            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="/Trending/Categories/", method="GET", auth=auth))

    async def get_trending_category(
        self, category_id: str, page_number: int, auth: Optional[AuthData] = None, *args, **kwargs
    ) -> dict:
        """
        Returns paginated lists of trending items for a category.

        Args:
            category_id: The ID of the category for whom you want additional results.
            page_number: The page # of results to return.
            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"/Trending/Categories/{category_id}/{page_number}/", method="GET", auth=auth)
        )

    async def get_trending_entry_detail(
        self, identifier: str, trending_entry_type: int, auth: Optional[AuthData] = None, *args, **kwargs
    ) -> dict:
        """
        Returns the detailed results for a specific trending entry. Note that trending entries are uniquely identified by a combination of *both* the TrendingEntryType *and* the identifier: the identifier alone is not guaranteed to be globally unique.

        Args:
            identifier: The identifier for the entity to be returned.
            trending_entry_type: The type of entity to be returned.
            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"/Trending/Details/{trending_entry_type}/{identifier}/", method="GET", auth=auth)
        )

Returns trending items for Bungie.net, collapsed into the first page of items per category. For pagination within a category, call GetTrendingCategory.

Parameters:

Name Type Description Default
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 src/bungio/http/routes/trending.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
async def get_trending_categories(self, auth: Optional[AuthData] = None, *args, **kwargs) -> dict:
    """
    Returns trending items for Bungie.net, collapsed into the first page of items per category. For pagination within a category, call GetTrendingCategory.

    Args:
        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="/Trending/Categories/", method="GET", auth=auth))

Returns paginated lists of trending items for a category.

Parameters:

Name Type Description Default
category_id str

The ID of the category for whom you want additional results.

required
page_number int

The page # of results to return.

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 src/bungio/http/routes/trending.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
async def get_trending_category(
    self, category_id: str, page_number: int, auth: Optional[AuthData] = None, *args, **kwargs
) -> dict:
    """
    Returns paginated lists of trending items for a category.

    Args:
        category_id: The ID of the category for whom you want additional results.
        page_number: The page # of results to return.
        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"/Trending/Categories/{category_id}/{page_number}/", method="GET", auth=auth)
    )

get_trending_entry_detail(identifier, trending_entry_type, auth=None, *args, **kwargs) async

Returns the detailed results for a specific trending entry. Note that trending entries are uniquely identified by a combination of both the TrendingEntryType and the identifier: the identifier alone is not guaranteed to be globally unique.

Parameters:

Name Type Description Default
identifier str

The identifier for the entity to be returned.

required
trending_entry_type int

The type of entity to be returned.

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 src/bungio/http/routes/trending.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
async def get_trending_entry_detail(
    self, identifier: str, trending_entry_type: int, auth: Optional[AuthData] = None, *args, **kwargs
) -> dict:
    """
    Returns the detailed results for a specific trending entry. Note that trending entries are uniquely identified by a combination of *both* the TrendingEntryType *and* the identifier: the identifier alone is not guaranteed to be globally unique.

    Args:
        identifier: The identifier for the entity to be returned.
        trending_entry_type: The type of entity to be returned.
        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"/Trending/Details/{trending_entry_type}/{identifier}/", method="GET", auth=auth)
    )