JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
Edited by lowlines: 5/4/2015 10:31:59 AM
0

InventoryItem Structure + Questions/Suggestions

One thing I don't think there's been a lot of so far in the forum is detailing the data structures you get when you do an API request. Below is the structure of an inventoryItem based upon the default structure present in the platform-lib.js file. I've added comments on all the variables that might not be obvious and/or are set with a value you can grab from [url=http://pastebin.com/Hy5ghZv1]Globals[/url]. [quote]inventoryItem: { itemHash: 0, itemName: '', itemDescription: '', icon: '', secondaryIcon: '', // Emblem Background displaySource: '', // Description of where/how a material can be obtained. actionName: '', actionDescription: '', tierTypeName: '', tierType: 0, // Tier Type (see Globals TierType) itemTypeName: '', // Override/Descriptive Item Type Name bucketTypeHash: 0, primaryBaseStatHash: 0, stats: [], perkHashes: [], itemIdentifier: '', // Only used for Currency Items specialItemType: 0, // 0 or 1; Only used for Marks and Strange Coins? talentGridHash: 0, equippingBlock: { // 3D Rendering Info weaponSandboxPatternIndex: 0, gearArtArrangementIndex: 0, defaultDyes: [], lockedDyes: [], customDyes: [], customDyeExpression: {}, weaponPatternHash: 0 }, hasGeometry: false, statGroupHash: 0, // Used on SubClasses, Sparrows, Weapons & Armor itemLevels: [], // Possibly not used or requires an item instance? qualityLevel: 0, // Possibly used in calculating a weapon's stats, but it's not clear how rewardItemHash: 0, // Not used in itemDefinition values: [], // Bounty rewards (itemHashes, ie reputation, experience, random item) itemType: 0, // Item Type (see Globals DestinyItemType) itemSubType: 0, // Sub Item Type (see Globals DestinyItemSubType) classType: 0, // Player Class Type (see Globals DestinyClass) sourceHashes: [], // Hashes seem to link to vendors, but they don't directly point to them nonTransferrable: false, // Items that have a temporary existence and/or don't go into your inventory exclusive: 0, // Not used maxStackSize: 0 }[/quote] It would be good if there was a way to identify if an item belongs to a specific DLC (designated by the <I> on the item icon), as well as if it is part of a set such as Vault of Glass gear or Dead Orbit gear. There are also items that are no longer used by the game (replaced by updated items etc), so it would be good to have a flag to filter them out. The sourceHashes appear to be linked to vendors but not directly as I could see that items from specific sets lined up with the vendor which sells them. If you include definitions=true on your API calls you will get a bare bones sourceDefinition, which includes a category variable (possibly the categories in the vendorDefinition?), but I don't believe there is a sourceDefinition in the mobile manifest as of yet. VendorDefinitions used to include a full list of items they could sell, but I'm not certain that is present anymore, so there may not currently be a way to get the full list of items that the vendor sells without going in through a user's character (and would only be for that moment in time anyway), which of course requires logging in. Other than the capacity to calculate weapon/armor stats, which I think has been brought up multiple times in the forum, I can't think of much else that should get exposed on Inventory Items at this point in time.

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon