Suggestion for string mapping / progress data

  • Thank you for the D3 API, it's a lot of fun!

    But is it really necessary to put so many long strings into each profile/hero json? Especially the skill descriptions, simpleDescriptions, quest names and even some slugs (quests) produce a lot of traffic without providing profile/hero relevant data.

    Of course it makes the json more human readable, but it's a programming interface, not for humans. And a 20 KB hero json is neither comfortable nor efficient.

    If the applications UI is non-english, you can't even use the descriptions ... :-(

    My suggestions is to use short IDs like simple integers, "q2" or "quest3" and provide for each language separate jsons for the real texts (d3_api_en.js, d3_api_de.js, ...):
    <code>{ "quests": ["The Fallen Star", "q2": "The Legacy of Cain", "quest3": "A Shattered Crown", ...],
    "skill_descriptions": [...],
    "skill_simple_descriptions": [...],
    "runes": [...] }</code>

    They could even contain the long-awaited killer ids and killer locations (for all languages, please).

    There's another problem with the progress data. Let's say you need the highest of all consecutively completed quests. Since uncompleted quests are omitted, no unique keys are used and the position and order are undetermined, it is very complicated to iterate through the array. The script needs an own array of the slugs and has to compare each value to identify the quest ... :-(

    Combined with the first suggestion to use short ids, I would love to see the progress data in a shape like this:

    <code>"progress": {
    "normal": { "act1": [1,1,1,1,0,0,0,1,1,1], "act2": [1,1,1,0,0,0,0,0,0,0], "act3": [0,0,0,0,0,0,0], "act4": [0,0,0,0]},
    "nightmare": ...

    Or give the quests short keys:
    <code>"act1": {"q1": 1, "q2": 1, "q3": 1, ...</code>

    Or with booleans:
    <code>"act1": [true,true,true,true,false,false,false,true,true,true]</code>

    Or put all quests of a difficulty in one array ...

    Anything thats easier to iterate is welcome! :)
  • It is possible to make localized requests using the locale request paramter:
    <code>"slug": "blacksmith",
    "name": "Herrero",
    "portrait": "pt_blacksmith",
    "training": {

    "tiers": [
    "tier": 1,
    "levels": [
    "tier": 1,
    "tierLevel": 1,
    "percent": 0,
    "trainedRecipes": [
    "slug": "apprentice-broad-axe",
    "name": "Hacha Ancha del Aprendiz",
    "cost": 495,

    I agree that sometimes the responses may look somewhat large, but some of this data is necessary. For example, some skill descriptions actually change on a per-character basis so it may be important for us to send down the more accurate descriptions for that character.

    That said, we will continue to evaluate the data we are sending down and keep in mind ways to avoid duplication of data when it's not needed.