Avatar of Potentiality #1530
Potentiality #1530
API modification proposal and feedback(1)Category: Community Platform APIDecember-22-2012 12:01 AM PST (10 years ago) Go to Blizzard forum post
Right now set items contain the ranks inside of an object looking something like this[1]. For some reason the set bonuses contain a "attributes" object but no "attributesRaw". This means anyone who wants to parse this data and extract the actual attribute mod needs to parsed through a localized string. My proposal is simple; add a attributesRaw here to prevent this burden on the API consumer. Right now I am going to be forced to just use the stats property because I don't have the time (nor do I want the library bloat) of localized string parsing of attributes.

On a side note, providing a aggregatedAttributesRaw property to the root level of a hero would also help very much. Players are interested in the unbuffed DPS, to do this they must parse each item and extract the modifiers and calculate them. Right now I make 15 requests to load a hero, 1 for the hero, then 14 times for each item because I need the raw attributes to calculate unbuffed dps. If they were included in the hero object it would be much easier to work with.

The current client I am working on is here[3] and I am open to any feedback if I am making this more complicated then it needs to be.

[1]

{ slug: 'natalyas-solace',
name: 'Natalya\'s Solace',
ranks:
[ { required: 2, attributes: { required: 2, attributes: [ 'Critical Hit Chance Increased by 7.0%' ] }},
{ required: 3, attributes: .. snip .. },
{ required: 4, attributes: .. snip .. } ],
items:
[ .. snip .. ] }


[2]

{ slug: 'natalyas-solace',
name: 'Natalya\'s Solace',
ranks:
[ { required: 2, attributes: { required: 2, attributes: [ 'Critical Hit Chance Increased by 7.0%' ], attributesRaw: [ 'Crit_Percent_Bonus_Capped' ] }},
{ required: 3, attributes: .. snip .. },
{ required: 4, attributes: .. snip .. } ],
items:
[ .. snip .. ] }


[3] https://github.com/cstockton/nodejs-lfger-d3
Avatar of Korigus
Korigus
API modification proposal and feedback(11)March-5-2013 4:43 PM PST (10 years ago) Go to Blizzard forum post
The attributesRaw field for set bonuses has been present there for some time now. Here is an example:
http://us.battle.net/api/d3/data/item/CjkIp-jlhQ0SBwgEFVHw6GsdslfV7h34ucU_HdZmipQdDmt__R2Ivr4hHcJqmxEwCTivA0AAUBJgrwMYosHHvg1QAlgAoAHxsdXjDaAB-e2X2AKgAcCEs6EDoAHokMvhA6ABosHHvg0
Avatar of Korigus
Korigus
API modification proposal and feedback(13)March-6-2013 1:01 PM PST (10 years ago) Go to Blizzard forum post
Thanks for the clarification, sorry about missing that other part.

We can look into including the hero's attributes and the equipped items' attributes into a raw data section inside the 'stats' object.

Furthermore, we'll see what we can do about providing the base damage/dps number (unmodified from any buffs/skills) as a value. This may remove the need to analyze all the raw data unless there are other examples or attributes that would be useful to calculate.
Feedback for Diablo Somepage