User Model
DestinyUser
Bases: DestinyUserMixin
A representation of a Destiny 2 user
Attributes:
| Name | Type | Description |
|---|---|---|
membership_id |
int
|
The user's id |
membership_type |
Union[BungieMembershipType, int]
|
The user's type, aka platform |
Source code in src/bungio/models/basic/user.py
13 14 15 16 17 18 19 20 21 22 23 24 | |
full_bungie_name
property
Return the formatted bungie name like it is seen in-game. This includes the four numbers
Returns:
| Type | Description |
|---|---|
str
|
The full bungie name |
_fuzzy_getattr(name)
Returns the objs attribute that fully matches the name, or if that does not exist, the first attribute that includes the name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to match |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no match is found |
Returns:
| Type | Description |
|---|---|
Any
|
The attribute value |
Source code in src/bungio/models/base.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
approve_pending(data, group_id, auth)
async
Approve the given membershipId to join the group/clan as long as they have applied.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupApplicationRequest
|
The required data for this request. |
required |
group_id
|
int
|
ID of the group. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
ban_member(data, group_id, auth)
async
Bans the requested member from the requested group for the specified period of time.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupBanRequest
|
The required data for this request. |
required |
group_id
|
int
|
Group ID that has the member to ban. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
edit_group_membership(group_id, member_type, auth)
async
Edit the membership type of a given member. You must have suitable permissions in the group to perform this operation.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
ID of the group to which the member belongs. |
required |
member_type
|
Union[RuntimeGroupMemberType, int]
|
New membertype for the specified member. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
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 | |
get_bungie_rewards_for_platform_user(auth)
async
Returns the bungie rewards for the targeted user when a platform membership Id and Type are used.
Requires Authentication.
Required oauth2 scopes: ReadAndApplyTokens
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, BungieRewardDisplay]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
get_groups_for_member(filter, group_type, auth=None)
async
Get information about the groups that a given member has joined.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter
|
Union[GroupsForMemberFilter, int]
|
Filter apply to list of joined groups. |
required |
group_type
|
Union[GroupType, int]
|
Type of group the supplied member founded. |
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 |
|---|---|
GetGroupsForMemberResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
get_historical_stats_for_account(groups, auth=None)
async
Gets aggregate historical stats organized around each character for a given account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
groups
|
list[Union[DestinyStatsGroupType, int]]
|
Groups of stats to include, otherwise only general stats are returned. Comma separated list is allowed. Values: General, Weapons, Medals. |
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 |
|---|---|
DestinyHistoricalStatsAccountResult
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
get_item(item_instance_id, components, auth=None)
async
Retrieve the details of an instanced Destiny Item. An instanced Destiny item is one with an ItemInstanceId. Non-instanced items, such as materials, have no useful instance-specific details and thus are not queryable here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_instance_id
|
int
|
The Instance ID of the destiny item. |
required |
components
|
list[Union[DestinyComponentType, int]]
|
A comma separated list of components to return (as strings or numeric values). See the DestinyComponentType enum for valid components to request. You must request at least one component to receive results. |
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 |
|---|---|
DestinyItemResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | |
get_leaderboards(maxtop, modes, statid, auth=None)
async
Gets leaderboards with the signed in user's friends and the supplied destinyMembershipId as the focus. PREVIEW: This endpoint has not yet been implemented. It is being returned for a preview of future functionality, and for public comment/suggestion/preparation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maxtop
|
int
|
Maximum number of top players to return. Use a large number to get entire leaderboard. |
required |
modes
|
str
|
List of game modes for which to get leaderboards. See the documentation for DestinyActivityModeType for valid values, and pass in string representation, comma delimited. |
required |
statid
|
str
|
ID of stat to return rather than returning all Leaderboard stats. |
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 |
|---|---|
dict[str, dict[str, DestinyLeaderboard]]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | |
get_linked_profiles(get_all_memberships, auth=None)
async
Returns a summary information about all profiles linked to the requesting membership type/membership ID that have valid Destiny information. The passed-in Membership Type/Membership ID may be a Bungie.Net membership or a Destiny membership. It only returns the minimal amount of data to begin making more substantive requests, but will hopefully serve as a useful alternative to UserServices for people who just care about Destiny data. Note that it will only return linked accounts whose linkages you are allowed to view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
get_all_memberships
|
bool
|
(optional) if set to 'true', all memberships regardless of whether they're obscured by overrides will be returned. Normal privacy restrictions on account linking will still apply no matter what. |
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 |
|---|---|
DestinyLinkedProfilesResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
get_membership_data_by_id(auth=None)
async
Returns a list of accounts associated with the supplied membership ID and membership type. This will include all linked accounts (even when hidden) if supplied credentials permit it.
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
|
Returns:
| Type | Description |
|---|---|
UserMembershipData
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_potential_groups_for_member(filter, group_type, auth=None)
async
Get information about the groups that a given member has applied to or been invited to.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter
|
Union[GroupPotentialMemberStatus, int]
|
Filter apply to list of potential joined groups. |
required |
group_type
|
Union[GroupType, int]
|
Type of group the supplied member applied. |
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 |
|---|---|
GroupPotentialMembershipSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
get_profile(components, auth=None)
async
Returns Destiny Profile information for the supplied membership.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
components
|
list[Union[DestinyComponentType, int]]
|
A comma separated list of components to return (as strings or numeric values). See the DestinyComponentType enum for valid components to request. You must request at least one component to receive results. |
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 |
|---|---|
DestinyProfileResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
individual_group_invite(data, group_id, auth)
async
Invite a user to join this group.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupApplicationRequest
|
The required data for this request. |
required |
group_id
|
int
|
ID of the group you would like to join. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupApplicationResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
individual_group_invite_cancel(group_id, auth)
async
Cancels a pending invitation to join a group.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
ID of the group you would like to join. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupApplicationResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
kick_member(group_id, auth)
async
Kick a member from the given group, forcing them to reapply if they wish to re-join the group. You must have suitable permissions in the group to perform this operation.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
Group ID to kick the user from. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupMemberLeaveResult
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
recover_group_for_founder(group_type, auth=None)
async
Allows a founder to manually recover a group they can see in game but not on bungie.net
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_type
|
Union[GroupType, int]
|
Type of group the supplied member founded. |
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 |
|---|---|
GroupMembershipSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
unban_member(group_id, auth)
async
Unbans the requested member, allowing them to re-apply for membership.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
|
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
yield_activity_history(mode, earliest_allowed_datetime=None, latest_allowed_datetime=None, auth=None)
async
Yields account activity history, no matter the character. Sorted by date descending, the latest one first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
Union[DestinyActivityModeType, int]
|
A filter for the activity mode to be returned. None returns all activities. See the documentation for DestinyActivityModeType for valid values, and pass in string representation. |
required |
earliest_allowed_datetime
|
Optional[datetime]
|
The earliest time the activity is allowed to have, fe. only entries after the 1/1/2020. |
None
|
latest_allowed_datetime
|
Optional[datetime]
|
The latest time the activity is allowed to have, fe. only entries before the 1/1/2020. |
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 |
|---|---|
AsyncGenerator[DestinyHistoricalStatsPeriodGroup, None]
|
A generator for the model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
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 | |
DestinyUserMixin
Bases: ClientMixin, FuzzyAttrFinder
Source code in src/bungio/models/mixins/user.py
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 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
full_bungie_name
property
Return the formatted bungie name like it is seen in-game. This includes the four numbers
Returns:
| Type | Description |
|---|---|
str
|
The full bungie name |
_fuzzy_getattr(name)
Returns the objs attribute that fully matches the name, or if that does not exist, the first attribute that includes the name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to match |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no match is found |
Returns:
| Type | Description |
|---|---|
Any
|
The attribute value |
Source code in src/bungio/models/base.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
approve_pending(data, group_id, auth)
async
Approve the given membershipId to join the group/clan as long as they have applied.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupApplicationRequest
|
The required data for this request. |
required |
group_id
|
int
|
ID of the group. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
ban_member(data, group_id, auth)
async
Bans the requested member from the requested group for the specified period of time.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupBanRequest
|
The required data for this request. |
required |
group_id
|
int
|
Group ID that has the member to ban. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
edit_group_membership(group_id, member_type, auth)
async
Edit the membership type of a given member. You must have suitable permissions in the group to perform this operation.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
ID of the group to which the member belongs. |
required |
member_type
|
Union[RuntimeGroupMemberType, int]
|
New membertype for the specified member. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
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 | |
get_bungie_rewards_for_platform_user(auth)
async
Returns the bungie rewards for the targeted user when a platform membership Id and Type are used.
Requires Authentication.
Required oauth2 scopes: ReadAndApplyTokens
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, BungieRewardDisplay]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
get_groups_for_member(filter, group_type, auth=None)
async
Get information about the groups that a given member has joined.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter
|
Union[GroupsForMemberFilter, int]
|
Filter apply to list of joined groups. |
required |
group_type
|
Union[GroupType, int]
|
Type of group the supplied member founded. |
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 |
|---|---|
GetGroupsForMemberResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
get_historical_stats_for_account(groups, auth=None)
async
Gets aggregate historical stats organized around each character for a given account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
groups
|
list[Union[DestinyStatsGroupType, int]]
|
Groups of stats to include, otherwise only general stats are returned. Comma separated list is allowed. Values: General, Weapons, Medals. |
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 |
|---|---|
DestinyHistoricalStatsAccountResult
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
get_item(item_instance_id, components, auth=None)
async
Retrieve the details of an instanced Destiny Item. An instanced Destiny item is one with an ItemInstanceId. Non-instanced items, such as materials, have no useful instance-specific details and thus are not queryable here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item_instance_id
|
int
|
The Instance ID of the destiny item. |
required |
components
|
list[Union[DestinyComponentType, int]]
|
A comma separated list of components to return (as strings or numeric values). See the DestinyComponentType enum for valid components to request. You must request at least one component to receive results. |
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 |
|---|---|
DestinyItemResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | |
get_leaderboards(maxtop, modes, statid, auth=None)
async
Gets leaderboards with the signed in user's friends and the supplied destinyMembershipId as the focus. PREVIEW: This endpoint has not yet been implemented. It is being returned for a preview of future functionality, and for public comment/suggestion/preparation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maxtop
|
int
|
Maximum number of top players to return. Use a large number to get entire leaderboard. |
required |
modes
|
str
|
List of game modes for which to get leaderboards. See the documentation for DestinyActivityModeType for valid values, and pass in string representation, comma delimited. |
required |
statid
|
str
|
ID of stat to return rather than returning all Leaderboard stats. |
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 |
|---|---|
dict[str, dict[str, DestinyLeaderboard]]
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | |
get_linked_profiles(get_all_memberships, auth=None)
async
Returns a summary information about all profiles linked to the requesting membership type/membership ID that have valid Destiny information. The passed-in Membership Type/Membership ID may be a Bungie.Net membership or a Destiny membership. It only returns the minimal amount of data to begin making more substantive requests, but will hopefully serve as a useful alternative to UserServices for people who just care about Destiny data. Note that it will only return linked accounts whose linkages you are allowed to view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
get_all_memberships
|
bool
|
(optional) if set to 'true', all memberships regardless of whether they're obscured by overrides will be returned. Normal privacy restrictions on account linking will still apply no matter what. |
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 |
|---|---|
DestinyLinkedProfilesResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
get_membership_data_by_id(auth=None)
async
Returns a list of accounts associated with the supplied membership ID and membership type. This will include all linked accounts (even when hidden) if supplied credentials permit it.
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
|
Returns:
| Type | Description |
|---|---|
UserMembershipData
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_potential_groups_for_member(filter, group_type, auth=None)
async
Get information about the groups that a given member has applied to or been invited to.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter
|
Union[GroupPotentialMemberStatus, int]
|
Filter apply to list of potential joined groups. |
required |
group_type
|
Union[GroupType, int]
|
Type of group the supplied member applied. |
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 |
|---|---|
GroupPotentialMembershipSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
get_profile(components, auth=None)
async
Returns Destiny Profile information for the supplied membership.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
components
|
list[Union[DestinyComponentType, int]]
|
A comma separated list of components to return (as strings or numeric values). See the DestinyComponentType enum for valid components to request. You must request at least one component to receive results. |
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 |
|---|---|
DestinyProfileResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
individual_group_invite(data, group_id, auth)
async
Invite a user to join this group.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
GroupApplicationRequest
|
The required data for this request. |
required |
group_id
|
int
|
ID of the group you would like to join. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupApplicationResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
individual_group_invite_cancel(group_id, auth)
async
Cancels a pending invitation to join a group.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
ID of the group you would like to join. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupApplicationResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
kick_member(group_id, auth)
async
Kick a member from the given group, forcing them to reapply if they wish to re-join the group. You must have suitable permissions in the group to perform this operation.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
Group ID to kick the user from. |
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
GroupMemberLeaveResult
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
recover_group_for_founder(group_type, auth=None)
async
Allows a founder to manually recover a group they can see in game but not on bungie.net
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_type
|
Union[GroupType, int]
|
Type of group the supplied member founded. |
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 |
|---|---|
GroupMembershipSearchResponse
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
unban_member(group_id, auth)
async
Unbans the requested member, allowing them to re-apply for membership.
Requires Authentication.
Required oauth2 scopes: AdminGroups
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_id
|
int
|
|
required |
auth
|
AuthData
|
Authentication information. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
yield_activity_history(mode, earliest_allowed_datetime=None, latest_allowed_datetime=None, auth=None)
async
Yields account activity history, no matter the character. Sorted by date descending, the latest one first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
Union[DestinyActivityModeType, int]
|
A filter for the activity mode to be returned. None returns all activities. See the documentation for DestinyActivityModeType for valid values, and pass in string representation. |
required |
earliest_allowed_datetime
|
Optional[datetime]
|
The earliest time the activity is allowed to have, fe. only entries after the 1/1/2020. |
None
|
latest_allowed_datetime
|
Optional[datetime]
|
The latest time the activity is allowed to have, fe. only entries before the 1/1/2020. |
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 |
|---|---|
AsyncGenerator[DestinyHistoricalStatsPeriodGroup, None]
|
A generator for the model which is returned by bungie. General endpoint information. |
Source code in src/bungio/models/mixins/user.py
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 | |