Skip to content

Social HTTP Routes

SocialRouteHttpRequests

Source code in src/bungio/http/routes/social.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
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
class SocialRouteHttpRequests:
    request: Callable[..., Coroutine]

    async def get_friend_list(self, auth: AuthData, *args, **kwargs) -> dict:
        """
        Returns your Bungie Friend list

        Warning: Requires Authentication.
            Required oauth2 scopes: ReadUserData

        Args:
            auth: Authentication information.

        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="/Social/Friends/", method="GET", auth=auth))

    async def get_friend_request_list(self, auth: AuthData, *args, **kwargs) -> dict:
        """
        Returns your friend request queue.

        Warning: Requires Authentication.
            Required oauth2 scopes: ReadUserData

        Args:
            auth: Authentication information.

        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="/Social/Friends/Requests/", method="GET", auth=auth))

    async def issue_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
        """
        Requests a friend relationship with the target user. Any of the target user's linked membership ids are valid inputs.

        Warning: Requires Authentication.
            Required oauth2 scopes: BnetWrite

        Args:
            membership_id: The membership id of the user you wish to add.
            auth: Authentication information.

        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"/Social/Friends/Add/{membership_id}/", method="POST", auth=auth))

    async def accept_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
        """
        Accepts a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

        Warning: Requires Authentication.
            Required oauth2 scopes: BnetWrite

        Args:
            membership_id: The membership id of the user you wish to accept.
            auth: Authentication information.

        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"/Social/Friends/Requests/Accept/{membership_id}/", method="POST", auth=auth)
        )

    async def decline_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
        """
        Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

        Warning: Requires Authentication.
            Required oauth2 scopes: BnetWrite

        Args:
            membership_id: The membership id of the user you wish to decline.
            auth: Authentication information.

        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"/Social/Friends/Requests/Decline/{membership_id}/", method="POST", auth=auth)
        )

    async def remove_friend(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
        """
        Remove a friend relationship with the target user. The user must be on your friend list, though no error will occur if they are not.

        Warning: Requires Authentication.
            Required oauth2 scopes: BnetWrite

        Args:
            membership_id: The membership id of the user you wish to remove.
            auth: Authentication information.

        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"/Social/Friends/Remove/{membership_id}/", method="POST", auth=auth))

    async def remove_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
        """
        Remove a friend relationship with the target user. The user must be on your outgoing request friend list, though no error will occur if they are not.

        Warning: Requires Authentication.
            Required oauth2 scopes: BnetWrite

        Args:
            membership_id: The membership id of the user you wish to remove.
            auth: Authentication information.

        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"/Social/Friends/Requests/Remove/{membership_id}/", method="POST", auth=auth)
        )

    async def get_platform_friend_list(
        self, friend_platform: int, page: str, auth: Optional[AuthData] = None, *args, **kwargs
    ) -> dict:
        """
        Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform.

        Args:
            friend_platform: The platform friend type.
            page: The zero based page to return. Page size is 100.
            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"/Social/PlatformFriends/{friend_platform}/{page}/", method="GET", auth=auth)
        )

accept_friend_request(membership_id, auth, *args, **kwargs) async

Accepts a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

Requires Authentication.

Required oauth2 scopes: BnetWrite

Parameters:

Name Type Description Default
membership_id str

The membership id of the user you wish to accept.

required
auth AuthData

Authentication information.

required

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/social.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
async def accept_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
    """
    Accepts a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

    Warning: Requires Authentication.
        Required oauth2 scopes: BnetWrite

    Args:
        membership_id: The membership id of the user you wish to accept.
        auth: Authentication information.

    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"/Social/Friends/Requests/Accept/{membership_id}/", method="POST", auth=auth)
    )

decline_friend_request(membership_id, auth, *args, **kwargs) async

Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

Requires Authentication.

Required oauth2 scopes: BnetWrite

Parameters:

Name Type Description Default
membership_id str

The membership id of the user you wish to decline.

required
auth AuthData

Authentication information.

required

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/social.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
async def decline_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
    """
    Declines a friend relationship with the target user. The user must be on your incoming friend request list, though no error will occur if they are not.

    Warning: Requires Authentication.
        Required oauth2 scopes: BnetWrite

    Args:
        membership_id: The membership id of the user you wish to decline.
        auth: Authentication information.

    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"/Social/Friends/Requests/Decline/{membership_id}/", method="POST", auth=auth)
    )

get_friend_list(auth, *args, **kwargs) async

Returns your Bungie Friend list

Requires Authentication.

Required oauth2 scopes: ReadUserData

Parameters:

Name Type Description Default
auth AuthData

Authentication information.

required

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/social.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
async def get_friend_list(self, auth: AuthData, *args, **kwargs) -> dict:
    """
    Returns your Bungie Friend list

    Warning: Requires Authentication.
        Required oauth2 scopes: ReadUserData

    Args:
        auth: Authentication information.

    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="/Social/Friends/", method="GET", auth=auth))

get_friend_request_list(auth, *args, **kwargs) async

Returns your friend request queue.

Requires Authentication.

Required oauth2 scopes: ReadUserData

Parameters:

Name Type Description Default
auth AuthData

Authentication information.

required

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/social.py
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_friend_request_list(self, auth: AuthData, *args, **kwargs) -> dict:
    """
    Returns your friend request queue.

    Warning: Requires Authentication.
        Required oauth2 scopes: ReadUserData

    Args:
        auth: Authentication information.

    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="/Social/Friends/Requests/", method="GET", auth=auth))

get_platform_friend_list(friend_platform, page, auth=None, *args, **kwargs) async

Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform.

Parameters:

Name Type Description Default
friend_platform int

The platform friend type.

required
page str

The zero based page to return. Page size is 100.

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/social.py
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
async def get_platform_friend_list(
    self, friend_platform: int, page: str, auth: Optional[AuthData] = None, *args, **kwargs
) -> dict:
    """
    Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform.

    Args:
        friend_platform: The platform friend type.
        page: The zero based page to return. Page size is 100.
        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"/Social/PlatformFriends/{friend_platform}/{page}/", method="GET", auth=auth)
    )

issue_friend_request(membership_id, auth, *args, **kwargs) async

Requests a friend relationship with the target user. Any of the target user's linked membership ids are valid inputs.

Requires Authentication.

Required oauth2 scopes: BnetWrite

Parameters:

Name Type Description Default
membership_id str

The membership id of the user you wish to add.

required
auth AuthData

Authentication information.

required

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/social.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
async def issue_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
    """
    Requests a friend relationship with the target user. Any of the target user's linked membership ids are valid inputs.

    Warning: Requires Authentication.
        Required oauth2 scopes: BnetWrite

    Args:
        membership_id: The membership id of the user you wish to add.
        auth: Authentication information.

    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"/Social/Friends/Add/{membership_id}/", method="POST", auth=auth))

remove_friend(membership_id, auth, *args, **kwargs) async

Remove a friend relationship with the target user. The user must be on your friend list, though no error will occur if they are not.

Requires Authentication.

Required oauth2 scopes: BnetWrite

Parameters:

Name Type Description Default
membership_id str

The membership id of the user you wish to remove.

required
auth AuthData

Authentication information.

required

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/social.py
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
async def remove_friend(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
    """
    Remove a friend relationship with the target user. The user must be on your friend list, though no error will occur if they are not.

    Warning: Requires Authentication.
        Required oauth2 scopes: BnetWrite

    Args:
        membership_id: The membership id of the user you wish to remove.
        auth: Authentication information.

    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"/Social/Friends/Remove/{membership_id}/", method="POST", auth=auth))

remove_friend_request(membership_id, auth, *args, **kwargs) async

Remove a friend relationship with the target user. The user must be on your outgoing request friend list, though no error will occur if they are not.

Requires Authentication.

Required oauth2 scopes: BnetWrite

Parameters:

Name Type Description Default
membership_id str

The membership id of the user you wish to remove.

required
auth AuthData

Authentication information.

required

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/social.py
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
async def remove_friend_request(self, membership_id: str, auth: AuthData, *args, **kwargs) -> dict:
    """
    Remove a friend relationship with the target user. The user must be on your outgoing request friend list, though no error will occur if they are not.

    Warning: Requires Authentication.
        Required oauth2 scopes: BnetWrite

    Args:
        membership_id: The membership id of the user you wish to remove.
        auth: Authentication information.

    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"/Social/Friends/Requests/Remove/{membership_id}/", method="POST", auth=auth)
    )