Responses API Models
DestinyCharacterResponse
Bases: BaseModel
The response contract for GetDestinyCharacter, with components that can be returned for character and item-level data.
None Attributes: activities: Activity data - info about current activities available to the player. COMPONENT TYPE: CharacterActivities character: Base information about the character in question. COMPONENT TYPE: Characters collectibles: COMPONENT TYPE: Collectibles currency_lookups: A "lookup" convenience component that can be used to quickly check if the character has access to items that can be used for purchasing. COMPONENT TYPE: CurrencyLookups equipment: Equipped items on the character. COMPONENT TYPE: CharacterEquipment inventory: The character-level non-equipped inventory items. COMPONENT TYPE: CharacterInventories item_components: The set of components belonging to the player's instanced items. COMPONENT TYPE: [See inside the DestinyItemComponentSet contract for component types.] kiosks: Items available from Kiosks that are available to this specific character. COMPONENT TYPE: Kiosks loadouts: The loadouts available to the character. COMPONENT TYPE: CharacterLoadouts plug_sets: When sockets refer to reusable Plug Sets (see DestinyPlugSetDefinition for more info), this is the set of plugs and their states that are scoped to this character. This comes back with ItemSockets, as it is needed for a complete picture of the sockets on requested items. COMPONENT TYPE: ItemSockets presentation_nodes: COMPONENT TYPE: PresentationNodes progressions: Character progression data, including Milestones. COMPONENT TYPE: CharacterProgressions records: COMPONENT TYPE: Records render_data: Character rendering data - a minimal set of information about equipment and dyes used for rendering. COMPONENT TYPE: CharacterRenderData uninstanced_item_components: The set of components belonging to the player's UNinstanced items. Because apparently now those too can have information relevant to the character's state. COMPONENT TYPE: [See inside the DestinyItemComponentSet contract for component types.]
Source code in src/bungio/models/bungie/destiny/responses.py
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 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyCollectibleNodeDetailResponse
Bases: BaseModel
Returns the detailed information about a Collectible Presentation Node and any Collectibles that are direct descendants.
None Attributes: collectible_item_components: Item components, keyed by the item hash of the items pointed at collectibles found under the requested Presentation Node. NOTE: I had a lot of hemming and hawing about whether these should be keyed by collectible hash or item hash... but ultimately having it be keyed by item hash meant that UI that already uses DestinyItemComponentSet data wouldn't have to have a special override to do the collectible -> item lookup once you delve into an item's details, and it also meant that you didn't have to remember that the Hash being used as the key for plugSets was different from the Hash being used for the other Dictionaries. As a result, using the Item Hash felt like the least crappy solution. We may all come to regret this decision. We will see. COMPONENT TYPE: [See inside the DestinyItemComponentSet contract for component types.] collectibles: COMPONENT TYPE: Collectibles
Source code in src/bungio/models/bungie/destiny/responses.py
423 424 425 426 427 428 429 430 431 432 433 434 435 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyErrorProfile
Bases: BaseModel
If a Destiny Profile can't be returned, but we're pretty certain it's a valid Destiny account, this will contain as much info as we can get about the profile for your use. Assume that the most you'll get is the Error Code, the Membership Type and the Membership ID.
None Attributes: error_code: The error that we encountered. You should be able to look up localized text to show to the user for these failures. info_card: Basic info about the account that failed. Don't expect anything other than membership ID, Membership Type, and displayName to be populated.
Source code in src/bungio/models/bungie/destiny/responses.py
150 151 152 153 154 155 156 157 158 159 160 161 162 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyItemChangeResponse
Bases: BaseModel
No description given by bungie.
None Attributes: added_inventory_items: Items that appeared in the inventory possibly as a result of an action. item: No description given by bungie. removed_inventory_items: Items that disappeared from the inventory possibly as a result of an action.
Source code in src/bungio/models/bungie/destiny/responses.py
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyItemResponse
Bases: BaseModel
The response object for retrieving an individual instanced item. None of these components are relevant for an item that doesn't have an "itemInstanceId": for those, get your information from the DestinyInventoryDefinition.
None Attributes: character_id: If the item is on a character, this will return the ID of the character that is holding the item. instance: Basic instance data for the item. COMPONENT TYPE: ItemInstances item: Common data for the item relevant to its non-instanced properties. COMPONENT TYPE: ItemCommonData objectives: Information specifically about the item's objectives. COMPONENT TYPE: ItemObjectives perks: Information specifically about the perks currently active on the item. COMPONENT TYPE: ItemPerks plug_objectives: Information about objectives on Plugs for a given item. See the component's documentation for more info. COMPONENT TYPE: ItemPlugObjectives render_data: Information about how to render the item in 3D. COMPONENT TYPE: ItemRenderData reusable_plugs: Information about the Reusable Plugs for sockets on an item. These are plugs that you can insert into the given socket regardless of if you actually own an instance of that plug: they are logic-driven plugs rather than inventory-driven. These may need to be combined with Plug Set component data to get a full picture of available plugs on a given socket. COMPONENT TYPE: ItemReusablePlugs sockets: Information about the sockets of the item: which are currently active, what potential sockets you could have and the stats/abilities/perks you can gain from them. COMPONENT TYPE: ItemSockets stats: Information about the computed stats of the item: power, defense, etc... COMPONENT TYPE: ItemStats talent_grid: Information about the talent grid attached to the item. Talent nodes can provide a variety of benefits and abilities, and in Destiny 2 are used almost exclusively for the character's "Builds". COMPONENT TYPE: ItemTalentGrids
Source code in src/bungio/models/bungie/destiny/responses.py
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 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyLinkedProfilesResponse
Bases: BaseModel
I know what you seek. You seek linked accounts. Found them, you have. This contract returns a minimal amount of data about Destiny Accounts that are linked through your Bungie.Net account. We will not return accounts in this response whose
None Attributes: bnet_membership: If the requested membership had a linked Bungie.Net membership ID, this is the basic information about that BNet account. I know, Tetron; I know this is mixing UserServices concerns with DestinyServices concerns. But it's so damn convenient! https://www.youtube.com/watch?v=X5R-bB-gKVI profiles: Any Destiny account for whom we could successfully pull characters will be returned here, as the Platform-level summary of user data. (no character data, no Destiny account data other than the Membership ID and Type so you can make further queries) profiles_with_errors: This is brief summary info for profiles that we believe have valid Destiny info, but who failed to return data for some other reason and thus we know that subsequent calls for their info will also fail.
Source code in src/bungio/models/bungie/destiny/responses.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyProfileResponse
Bases: BaseModel
The response for GetDestinyProfile, with components for character and item-level data.
None Attributes: character_activities: Character activity data - the activities available to this character and its status, keyed by the Character's Id. COMPONENT TYPE: CharacterActivities character_collectibles: COMPONENT TYPE: Collectibles character_craftables: COMPONENT TYPE: Craftables character_currency_lookups: A "lookup" convenience component that can be used to quickly check if the character has access to items that can be used for purchasing. COMPONENT TYPE: CurrencyLookups character_equipment: The character's equipped items, keyed by the Character's Id. COMPONENT TYPE: CharacterEquipment character_inventories: The character-level non-equipped inventory items, keyed by the Character's Id. COMPONENT TYPE: CharacterInventories character_kiosks: Items available from Kiosks that are available to a specific character as opposed to the account as a whole. It must be combined with data from the profileKiosks property to get a full picture of the character's available items to check out of a kiosk. This component returns information about what Kiosk items are available to you on a Character level. Usually, kiosk items will be earned for the entire Profile (all characters) at once. To find those, look in the profileKiosks property. COMPONENT TYPE: Kiosks character_loadouts: The character loadouts, keyed by the Character's Id. COMPONENT TYPE: CharacterLoadouts character_plug_sets: When sockets refer to reusable Plug Sets (see DestinyPlugSetDefinition for more info), this is the set of plugs and their states, per character, that are character-scoped. This comes back with ItemSockets, as it is needed for a complete picture of the sockets on requested items. COMPONENT TYPE: ItemSockets character_presentation_nodes: COMPONENT TYPE: PresentationNodes character_progressions: Character-level progression data, keyed by the Character's Id. COMPONENT TYPE: CharacterProgressions character_records: COMPONENT TYPE: Records character_render_data: Character rendering data - a minimal set of info needed to render a character in 3D - keyed by the Character's Id. COMPONENT TYPE: CharacterRenderData character_string_variables: COMPONENT TYPE: StringVariables character_uninstanced_item_components: Do you ever get the feeling that a system was designed too flexibly? That it can be used in so many different ways that you end up being unable to provide an easy to use abstraction for the mess that's happening under the surface? Let's talk about character-specific data that might be related to items without instances. These two statements are totally unrelated, I promise. At some point during D2, it was decided that items - such as Bounties - could be given to characters and not have instance data, but that could display and even use relevant state information on your account and character. Up to now, any item that had meaningful dependencies on character or account state had to be instanced, and thus "itemComponents" was all that you needed: it was keyed by item's instance IDs and provided the stateful information you needed inside. Unfortunately, we don't live in such a magical world anymore. This is information held on a per-character basis about non-instanced items that the characters have in their inventory - or that reference character-specific state information even if it's in Account-level inventory - and the values related to that item's state in relation to the given character. To give a concrete example, look at a Moments of Triumph bounty. They exist in a character's inventory, and show/care about a character's progression toward completing the bounty. But the bounty itself is a non-instanced item, like a mod or a currency. This returns that data for the characters who have the bounty in their inventory. I'm not crying, you're crying Okay we're both crying but it's going to be okay I promise Actually I shouldn't promise that, I don't know if it's going to be okay characters: Basic information about each character, keyed by the CharacterId. COMPONENT TYPE: Characters item_components: Information about instanced items across all returned characters, keyed by the item's instance ID. COMPONENT TYPE: [See inside the DestinyItemComponentSet contract for component types.] metrics: COMPONENT TYPE: Metrics platform_silver: Silver quantities for any platform on which this Profile plays destiny. COMPONENT TYPE: PlatformSilver profile: The basic information about the Destiny Profile (formerly "Account"). COMPONENT TYPE: Profiles profile_collectibles: COMPONENT TYPE: Collectibles profile_commendations: COMPONENT TYPE: SocialCommendations profile_currencies: The profile-level currencies owned by the Destiny Profile. COMPONENT TYPE: ProfileCurrencies profile_inventory: The profile-level inventory of the Destiny Profile. COMPONENT TYPE: ProfileInventories profile_kiosks: Items available from Kiosks that are available Profile-wide (i.e. across all characters) This component returns information about what Kiosk items are available to you on a Profile level. It is theoretically possible for Kiosks to have items gated by specific Character as well. If you ever have those, you will find them on the characterKiosks property. COMPONENT TYPE: Kiosks profile_plug_sets: When sockets refer to reusable Plug Sets (see DestinyPlugSetDefinition for more info), this is the set of plugs and their states that are profile-scoped. This comes back with ItemSockets, as it is needed for a complete picture of the sockets on requested items. COMPONENT TYPE: ItemSockets profile_presentation_nodes: COMPONENT TYPE: PresentationNodes profile_progression: When we have progression information - such as Checklists - that may apply profile-wide, it will be returned here rather than in the per-character progression data. COMPONENT TYPE: ProfileProgression profile_records: COMPONENT TYPE: Records profile_string_variables: COMPONENT TYPE: StringVariables profile_transitory_data: COMPONENT TYPE: Transitory response_minted_timestamp: Records the timestamp of when most components were last generated from the world server source. Unless the component type is specified in the documentation for secondaryComponentsMintedTimestamp, this value is sufficient to do data freshness. secondary_components_minted_timestamp: Some secondary components are not tracked in the primary response timestamp and have their timestamp tracked here. If your component is any of the following, this field is where you will find your timestamp value: PresentationNodes, Records, Collectibles, Metrics, StringVariables, Craftables, Transitory All other component types may use the primary timestamp property. vendor_receipts: Recent, refundable purchases you have made from vendors. When will you use it? Couldn't say... COMPONENT TYPE: VendorReceipts
Source code in src/bungio/models/bungie/destiny/responses.py
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 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyProfileUserInfoCard
Bases: BaseModel, DestinyUserMixin
No description given by bungie.
None Attributes: applicable_membership_types: The list of Membership Types indicating the platforms on which this Membership can be used. Not in Cross Save = its original membership type. Cross Save Primary = Any membership types it is overridding, and its original membership type Cross Save Overridden = Empty list bungie_global_display_name: The bungie global display name, if set. bungie_global_display_name_code: The bungie global display name code, if set. cross_save_override: If there is a cross save override in effect, this value will tell you the type that is overridding this one. date_last_played: No description given by bungie. display_name: Display Name the player has chosen for themselves. The display name is optional when the data type is used as input to a platform API. icon_path: URL the Icon if available. is_cross_save_primary: If true, this account is hooked up as the "Primary" cross save account for one or more platforms. is_overridden: If this profile is being overridden/obscured by Cross Save, this will be set to true. We will still return the profile for display purposes where users need to know the info: it is up to any given area of the app/site to determine if this profile should still be shown. is_public: If True, this is a public user membership. membership_id: Membership ID as they user is known in the Accounts service membership_type: Type of the membership. Not necessarily the native type. platform_silver: This is the silver available on this Profile across any platforms on which they have purchased silver. This is only available if you are requesting yourself. supplemental_display_name: A platform specific additional display name - ex: psn Real Name, bnet Unique Name, etc. unpaired_game_versions: If this profile is not in a cross save pairing, this will return the game versions that we believe this profile has access to. For the time being, we will not return this information for any membership that is in a cross save pairing. The gist is that, once the pairing occurs, we do not currently have a consistent way to get that information for the profile's original Platform, and thus gameVersions would be too inconsistent (based on the last platform they happened to play on) for the info to be useful. If we ever can get this data, this field will be deprecated and replaced with data on the DestinyLinkedProfileResponse itself, with game versions per linked Platform. But since we can't get that, we have this as a stop-gap measure for getting the data in the only situation that we currently need it.
Source code in src/bungio/models/bungie/destiny/responses.py
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 | |
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 |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
_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 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
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 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
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 | |
DestinyPublicVendorsResponse
Bases: BaseModel
A response containing all valid components for the public Vendors endpoint. It is a decisively smaller subset of data compared to what we can get when we know the specific user making the request. If you want any of the other data - item details, whether or not you can buy it, etc... you'll have to call in the context of a character. I know, sad but true.
None Attributes: categories: Categories that the vendor has available, and references to the sales therein. These are keyed by the Vendor Hash, so you will get one Categories Component per vendor returned. COMPONENT TYPE: VendorCategories sales: Sales, keyed by the vendorItemIndex of the item being sold. These are keyed by the Vendor Hash, so you will get one Sale Item Set Component per vendor returned. Note that within the Sale Item Set component, the sales are themselves keyed by the vendorSaleIndex, so you can relate it to the corrent sale item definition within the Vendor's definition. COMPONENT TYPE: VendorSales string_variables: A set of string variable values by hash for a public vendors context. COMPONENT TYPE: StringVariables vendor_groups: For Vendors being returned, this will give you the information you need to group them and order them in the same way that the Bungie Companion app performs grouping. It will automatically be returned if you request the Vendors component. COMPONENT TYPE: Vendors vendors: The base properties of the vendor. These are keyed by the Vendor Hash, so you will get one Vendor Component per vendor returned. COMPONENT TYPE: Vendors
Source code in src/bungio/models/bungie/destiny/responses.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyVendorResponse
Bases: BaseModel
A response containing all of the components for a vendor.
None Attributes: categories: Categories that the vendor has available, and references to the sales therein. COMPONENT TYPE: VendorCategories currency_lookups: A "lookup" convenience component that can be used to quickly check if the character has access to items that can be used for purchasing. COMPONENT TYPE: CurrencyLookups item_components: Item components, keyed by the vendorItemIndex of the active sale items. COMPONENT TYPE: [See inside the DestinyVendorItemComponentSet contract for component types.] sales: Sales, keyed by the vendorItemIndex of the item being sold. COMPONENT TYPE: VendorSales string_variables: A map of string variable values by hash for this character context. COMPONENT TYPE: StringVariables vendor: The base properties of the vendor. COMPONENT TYPE: Vendors
Source code in src/bungio/models/bungie/destiny/responses.py
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
DestinyVendorsResponse
Bases: BaseModel
A response containing all of the components for all requested vendors.
None Attributes: categories: Categories that the vendor has available, and references to the sales therein. These are keyed by the Vendor Hash, so you will get one Categories Component per vendor returned. COMPONENT TYPE: VendorCategories currency_lookups: A "lookup" convenience component that can be used to quickly check if the character has access to items that can be used for purchasing. COMPONENT TYPE: CurrencyLookups item_components: The set of item detail components, one set of item components per Vendor. These are keyed by the Vendor Hash, so you will get one Item Component Set per vendor returned. The components contained inside are themselves keyed by the vendorSaleIndex, and will have whatever item-level components you requested (Sockets, Stats, Instance data etc...) per item being sold by the vendor. sales: Sales, keyed by the vendorItemIndex of the item being sold. These are keyed by the Vendor Hash, so you will get one Sale Item Set Component per vendor returned. Note that within the Sale Item Set component, the sales are themselves keyed by the vendorSaleIndex, so you can relate it to the current sale item definition within the Vendor's definition. COMPONENT TYPE: VendorSales string_variables: A map of string variable values by hash for this character context. COMPONENT TYPE: StringVariables vendor_groups: For Vendors being returned, this will give you the information you need to group them and order them in the same way that the Bungie Companion app performs grouping. It will automatically be returned if you request the Vendors component. COMPONENT TYPE: Vendors vendors: The base properties of the vendor. These are keyed by the Vendor Hash, so you will get one Vendor Component per vendor returned. COMPONENT TYPE: Vendors
Source code in src/bungio/models/bungie/destiny/responses.py
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 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
InventoryChangedResponse
Bases: BaseModel
A response containing all of the components for all requested vendors.
None Attributes: added_inventory_items: Items that appeared in the inventory possibly as a result of an action. removed_inventory_items: Items that disappeared from the inventory possibly as a result of an action.
Source code in src/bungio/models/bungie/destiny/responses.py
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
PersonalDestinyVendorSaleItemSetComponent
Bases: BaseModel
No description given by bungie.
None Attributes: sale_items: No description given by bungie.
Source code in src/bungio/models/bungie/destiny/responses.py
349 350 351 352 353 354 355 356 357 358 359 360 361 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
PublicDestinyVendorSaleItemSetComponent
Bases: BaseModel
No description given by bungie.
None Attributes: sale_items: No description given by bungie.
Source code in src/bungio/models/bungie/destiny/responses.py
408 409 410 411 412 413 414 415 416 417 418 419 420 | |
_convert_to_bungie_case(string)
cached
staticmethod
Convert a string to how it is represented by bungie: my_name_string -> myNameString
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The og string |
required |
Returns:
| Type | Description |
|---|---|
str
|
The bungie string |
Source code in src/bungio/models/base.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
fetch_manifest_information(include=None, exclude=None, _cache=None)
async
Fill the model in-place with information from the manifest.
Example
Fill every attribute
1 2 3 4 | |
Fill only some attribute
1 2 3 4 | |
1 2 3 4 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include
|
Optional[list[str]]
|
A list of attributes you want to include. Excludes everything not mentioned |
None
|
exclude
|
Optional[list[str]]
|
A list of attributes you want to exclude. Includes everything not mentioned |
None
|
Source code in src/bungio/models/base.py
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
from_dict(data, client, recursive=False, *args, **kwargs)
async
classmethod
Convert json data to this model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
recursive
|
bool
|
If this was called recursively |
False
|
Returns:
| Type | Description |
|---|---|
BaseModel
|
The model |
Source code in src/bungio/models/base.py
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 | |
process_dict(data, client, *args, **kwargs)
staticmethod
Model specific cleanup
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
The json representation of the model, usually received by bungie |
required |
client
|
'Client'
|
The client obj |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Clean json |
Source code in src/bungio/models/base.py
260 261 262 263 264 265 266 267 268 269 270 271 272 | |
to_dict(_return_to_bungie_case=True)
Convert the model into a dict representation bungie accepts
Returns:
| Type | Description |
|---|---|
dict
|
A dict which can be sent to bungie |
Source code in src/bungio/models/base.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |