Page 1 of 3 123 LastLast
Results 1 to 10 of 30

  Click here to go to the first staff post in this thread.   Thread: Builder Base API updated!

  1.   This is the last staff post in this thread.   #1
    Anoushka[Supercell]'s Avatar
    Join Date
    Apr 2013
    Location
    Nousheyland
    Posts
    1,705

    Builder Base API updated!

    Good news! Our team did some magic and there is now support for the Builder Base in the Clash API.

    We added the following items:
    • Achievements, Troops and Spells now have information about the Village they belong to
    • Player information now has Builder Hall level, Versus trophies, best Versus trophies and number of Versus Battle victories
    • Clan info has Clan Versus points and Clan members have their Versus trophies listed
    • Rankings now support also the versus game mode rankings


    Enjoy!
    Official Clash FAQs & Support --> click here


    Signature by theblackbeltpanda64


  2. #2
    Millennial Club ClashOfHolmes's Avatar
    Join Date
    Oct 2016
    Location
    Treat ever'body right, but if they steps on ya, lay 'em among the swee'peas
    Posts
    1,197
    Oooh yeah! Thanks!

    Thanks to TheShadow626 for the signature

    #GoodByeClashRoyaleForums

    Join this Amazing Discord Server!!!

  3. #3
    Thanks for the quick response on this. Now to redesign to add this info correctly.

    I did notice that the builder base troops are still showing up as level 1 even if the base has not unlocked them yet. Can we get these to show as level 0 or not at all if the member has not unlocked them yet.

    { "name": "Baby Dragon", "level": 1, "maxLevel": 16, "village": "builderBase" },

    Member of the Black List clan. http://www.the-blacklist.ca.

  4. #4
    Junior Member
    Join Date
    Feb 2016
    Posts
    56
    I know why there is a concern with dragon babies, they bear the same name in both types of villages and as we use loops, our variables take the last value found. We must now make the difference using the name of the village under our conditions, unless supercell modifies a little the name used

    like this

    if ($parsed_json->{'troops'}[$i]->{'name'}=="Baby Dragon" and $parsed_json->{'troops'}[$i]->{'village'}=="home"){$bebe=$parsed_json->{'troops'}[$i]->{'level'};}
    Last edited by Notger; May 23rd, 2017 at 12:14 PM.

  5. #5
    Senior Member NattensNinjaerJakob's Avatar
    Join Date
    Aug 2016
    Location
    Denmark
    Posts
    223
    Thanks a lot for swift action. It would be nice if you could change the level to 0 for the troops people do not yet have, or in some other way indicate if people have them or not.

    Something else. Does anyone know if the new hero in the Builders base also appear in the API?

    I now see this on my base (where I do not yet have the new hero):

    ["heroes"]=>
    array(3) {
    [0]=>
    array(4) {
    ["name"]=>
    string(14) "Barbarian King"
    ["level"]=>
    int(41)
    ["maxLevel"]=>
    int(45)
    ["village"]=>
    string(4) "home"
    }
    [1]=>
    array(4) {
    ["name"]=>
    string(12) "Archer Queen"
    ["level"]=>
    int(45)
    ["maxLevel"]=>
    int(45)
    ["village"]=>
    string(4) "home"
    }
    [2]=>
    array(4) {
    ["name"]=>
    string(12) "Grand Warden"
    ["level"]=>
    int(16)
    ["maxLevel"]=>
    int(20)
    ["village"]=>
    string(4) "home"
    }
    }

    I wonder what the name is for the new hero and if he appears here...
    TH12/BH9. Heroes: 65/65/40/30. 106 of 108 achievement stars. Clan leader of 4 clans; Lvl 23, 19, 9 & 6.
    Obsessed since Jan 2013.


  6. #6
    It does.
    { "name": "Battle Machine", "level": 5, "maxLevel": 30, "village": "builderBase" }

    No, I didn't gem it...I just looked up the person with the highest trophies and figured they did

    {
    "tag": "#LY2CR89L",
    "name": "gram",
    "townHallLevel": 11,
    "expLevel": 180,
    "trophies": 5953,
    "bestTrophies": 6018,
    "warStars": 268,
    "attackWins": 177,
    "defenseWins": 12,
    "builderHallLevel": 5,
    "versusTrophies": 2362,
    "bestVersusTrophies": 2214,
    "versusBattleWins": 96,
    "role": "coLeader",
    "donations": 3101,
    "donationsReceived": 3024,
    "clan": {
    "tag": "#99VPLY0Q",
    "name": "Yea Baby!!!!",
    "clanLevel": 12,
    "badgeUrls": {
    "small": "https://api-assets.clashofclans.com/badges/70/vNSZpxuLPIcrw9C5dwdniUY-xiv0kg-o428_7rWqtKQ.png",
    "large": "https://api-assets.clashofclans.com/badges/512/vNSZpxuLPIcrw9C5dwdniUY-xiv0kg-o428_7rWqtKQ.png",
    "medium": "https://api-assets.clashofclans.com/badges/200/vNSZpxuLPIcrw9C5dwdniUY-xiv0kg-o428_7rWqtKQ.png"
    }
    },
    "league": {
    "id": 29000022,
    "name": "Legend League",
    "iconUrls": {
    "small": "https://api-assets.clashofclans.com/leagues/72/R2zmhyqQ0_lKcDR5EyghXCxgyC9mm_mVMIjAbmGoZtw.png",
    "tiny": "https://api-assets.clashofclans.com/leagues/36/R2zmhyqQ0_lKcDR5EyghXCxgyC9mm_mVMIjAbmGoZtw.png",
    "medium": "https://api-assets.clashofclans.com/leagues/288/R2zmhyqQ0_lKcDR5EyghXCxgyC9mm_mVMIjAbmGoZtw.png"
    }
    },
    "legendStatistics": {
    "legendTrophies": 4991,
    "previousSeason": {
    "id": "2017-04",
    "rank": 700,
    "trophies": 6011
    },
    "bestSeason": {
    "id": "2017-02",
    "rank": 596,
    "trophies": 5949
    },
    "currentSeason": {
    "rank": 334,
    "trophies": 5953
    }
    },
    "achievements": [
    {
    "name": "Bigger Coffers",
    "stars": 3,
    "value": 12,
    "target": 10,
    "info": "Upgrade a Gold Storage to level 10",
    "completionInfo": "Highest Gold Storage level: 12",
    "village": "home"
    },
    {
    "name": "Get those Goblins!",
    "stars": 3,
    "value": 153,
    "target": 150,
    "info": "Win 150 stars on the Campaign Map",
    "completionInfo": "Stars in Campaign Map: 153",
    "village": "home"
    },
    {
    "name": "Bigger & Better",
    "stars": 3,
    "value": 11,
    "target": 8,
    "info": "Upgrade Town Hall to level 8",
    "completionInfo": "Current Town Hall level: 11",
    "village": "home"
    },
    {
    "name": "Nice and Tidy",
    "stars": 3,
    "value": 2039,
    "target": 500,
    "info": "Remove 500 obstacles (trees, rocks, bushes)",
    "completionInfo": "Total obstacles removed: 2039",
    "village": "home"
    },
    {
    "name": "Release the Beasts",
    "stars": 3,
    "value": 1,
    "target": 1,
    "info": "Unlock Dragon in the Barracks",
    "village": "home"
    },
    {
    "name": "Gold Grab",
    "stars": 3,
    "value": 972729832,
    "target": 100000000,
    "info": "Steal 100000000 gold",
    "completionInfo": "Total Gold looted: 972729832",
    "village": "home"
    },
    {
    "name": "Elixir Escapade",
    "stars": 3,
    "value": 919855590,
    "target": 100000000,
    "info": "Steal 100000000 elixir",
    "completionInfo": "Total Elixir looted: 919855590",
    "village": "home"
    },
    {
    "name": "Sweet Victory!",
    "stars": 3,
    "value": 6018,
    "target": 1250,
    "info": "Achieve a total of 1250 trophies in Multiplayer battles",
    "completionInfo": "Trophy record: 6018",
    "village": "home"
    },
    {
    "name": "Empire Builder",
    "stars": 3,
    "value": 7,
    "target": 4,
    "info": "Upgrade Clan Castle to level 4",
    "completionInfo": "Current Clan Castle level: 7",
    "village": "home"
    },
    {
    "name": "Wall Buster",
    "stars": 3,
    "value": 57107,
    "target": 2000,
    "info": "Destroy 2000 Walls in Multiplayer battles",
    "completionInfo": "Total walls destroyed: 57107",
    "village": "home"
    },
    {
    "name": "Humiliator",
    "stars": 3,
    "value": 4730,
    "target": 2000,
    "info": "Destroy 2000 Town Halls in Multiplayer battles",
    "completionInfo": "Total Town Halls destroyed: 4730",
    "village": "home"
    },
    {
    "name": "Union Buster",
    "stars": 3,
    "value": 17124,
    "target": 2500,
    "info": "Destroy 2500 Builder's Huts in Multiplayer battles",
    "completionInfo": "Total Builder's Huts destroyed: 17124",
    "village": "home"
    },
    {
    "name": "Conqueror",
    "stars": 3,
    "value": 6166,
    "target": 5000,
    "info": "Win 5000 Multiplayer battles",
    "completionInfo": "Total multiplayer battles won: 6166",
    "village": "home"
    },
    {
    "name": "Unbreakable",
    "stars": 2,
    "value": 2504,
    "target": 5000,
    "info": "Successfully defend against 5000 attacks",
    "completionInfo": "Total defenses won: 2504",
    "village": "home"
    },
    {
    "name": "Friend in Need",
    "stars": 3,
    "value": 160852,
    "target": 25000,
    "info": "Donate 25000 Clan Castle capacity worth of reinforcements",
    "completionInfo": "Total capacity donated: 160852",
    "village": "home"
    },
    {
    "name": "Mortar Mauler",
    "stars": 3,
    "value": 11796,
    "target": 5000,
    "info": "Destroy 5000 Mortars in Multiplayer battles",
    "completionInfo": "Total Mortars destroyed: 11796",
    "village": "home"
    },
    {
    "name": "Heroic Heist",
    "stars": 3,
    "value": 8557517,
    "target": 1000000,
    "info": "Steal 1000000 Dark Elixir",
    "completionInfo": "Total Dark Elixir looted: 8557517",
    "village": "home"
    },
    {
    "name": "League All-Star",
    "stars": 3,
    "value": 22,
    "target": 1,
    "info": "Become a Champion!",
    "village": "home"
    },
    {
    "name": "X-Bow Exterminator",
    "stars": 3,
    "value": 9678,
    "target": 2500,
    "info": "Destroy 2500 X-Bows in Multiplayer battles",
    "completionInfo": "Total X-Bows destroyed: 9678",
    "village": "home"
    },
    {
    "name": "Firefighter",
    "stars": 3,
    "value": 5070,
    "target": 5000,
    "info": "Destroy 5000 Inferno Towers in Multiplayer battles",
    "completionInfo": "Total Inferno Towers destroyed: 5070",
    "village": "home"
    },
    {
    "name": "War Hero",
    "stars": 2,
    "value": 268,
    "target": 1000,
    "info": "Score 1000 stars for your clan in Clan War battles",
    "completionInfo": "Total stars scored for clan in Clan War battles: 268",
    "village": "home"
    },
    {
    "name": "Treasurer",
    "stars": 3,
    "value": 123627237,
    "target": 100000000,
    "info": "Collect 100000000 gold from the Treasury",
    "completionInfo": "Total gold collected in Clan War bonuses: 123627237",
    "village": "home"
    },
    {
    "name": "Anti-Artillery",
    "stars": 2,
    "value": 1921,
    "target": 2000,
    "info": "Destroy 2000 Eagle Artilleries in Multiplayer battles",
    "completionInfo": "Total Eagle Artilleries destroyed: 1921",
    "village": "home"
    },
    {
    "name": "Sharing is caring",
    "stars": 2,
    "value": 3978,
    "target": 10000,
    "info": "Donate 10000 spell storage capacity worth of spells",
    "completionInfo": "Total spell capacity donated: 3978",
    "village": "home"
    },
    {
    "name": "Keep your village safe",
    "stars": 1,
    "value": 1,
    "target": 1,
    "info": "Connect your account to a social network for safe keeping.",
    "completionInfo": "Completed!",
    "village": "home"
    },
    {
    "name": "Master Engineering",
    "stars": 2,
    "value": 5,
    "target": 8,
    "info": "Upgrade Builder Hall to level 8",
    "completionInfo": "Current Builder Hall level: 5",
    "village": "builderBase"
    },
    {
    "name": "Next Generation Model",
    "stars": 2,
    "value": 1,
    "target": 1,
    "info": "Unlock Cannon Cart in the Builder Barracks",
    "village": "builderBase"
    },
    {
    "name": "Un-Build It",
    "stars": 1,
    "value": 99,
    "target": 100,
    "info": "Destroy 100 Builder Halls in Versus battles",
    "completionInfo": "Total Builder Halls destroyed: 99",
    "village": "builderBase"
    },
    {
    "name": "Champion Builder",
    "stars": 2,
    "value": 2214,
    "target": 3000,
    "info": "Achieve a total of 3000 trophies in Versus battles",
    "completionInfo": "Versus Trophy record: 2214",
    "village": "builderBase"
    },
    {
    "name": "High Gear",
    "stars": 1,
    "value": 1,
    "target": 2,
    "info": "Gear Up 2 buildings using the Master Builder",
    "completionInfo": "Total buildings geared up: 1",
    "village": "builderBase"
    },
    {
    "name": "Hidden Treasures",
    "stars": 3,
    "value": 1,
    "target": 1,
    "info": "Rebuild Battle Machine",
    "village": "builderBase"
    }
    ],
    "versusBattleWinCount": 96,
    "troops": [
    {
    "name": "Barbarian",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Archer",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Goblin",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Giant",
    "level": 8,
    "maxLevel": 8,
    "village": "home"
    },
    {
    "name": "Wall Breaker",
    "level": 6,
    "maxLevel": 6,
    "village": "home"
    },
    {
    "name": "Balloon",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Wizard",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Healer",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    },
    {
    "name": "Dragon",
    "level": 6,
    "maxLevel": 6,
    "village": "home"
    },
    {
    "name": "P.E.K.K.A",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Minion",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Hog Rider",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Valkyrie",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Golem",
    "level": 6,
    "maxLevel": 6,
    "village": "home"
    },
    {
    "name": "Witch",
    "level": 3,
    "maxLevel": 3,
    "village": "home"
    },
    {
    "name": "Lava Hound",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    },
    {
    "name": "Bowler",
    "level": 3,
    "maxLevel": 3,
    "village": "home"
    },
    {
    "name": "Baby Dragon",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Miner",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    },
    {
    "name": "Raged Barbarian",
    "level": 8,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Sneaky Archer",
    "level": 8,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Beta Minion",
    "level": 2,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Boxer Giant",
    "level": 8,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Bomber",
    "level": 1,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Super P.E.K.K.A",
    "level": 1,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Cannon Cart",
    "level": 1,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Drop Ship",
    "level": 1,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Baby Dragon",
    "level": 10,
    "maxLevel": 16,
    "village": "builderBase"
    },
    {
    "name": "Night Witch",
    "level": 1,
    "maxLevel": 16,
    "village": "builderBase"
    }
    ],
    "heroes": [
    {
    "name": "Barbarian King",
    "level": 45,
    "maxLevel": 45,
    "village": "home"
    },
    {
    "name": "Archer Queen",
    "level": 45,
    "maxLevel": 45,
    "village": "home"
    },
    {
    "name": "Grand Warden",
    "level": 20,
    "maxLevel": 20,
    "village": "home"
    },
    {
    "name": "Battle Machine",
    "level": 5,
    "maxLevel": 30,
    "village": "builderBase"
    }
    ],
    "spells": [
    {
    "name": "Lightning Spell",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Healing Spell",
    "level": 7,
    "maxLevel": 7,
    "village": "home"
    },
    {
    "name": "Rage Spell",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Jump Spell",
    "level": 3,
    "maxLevel": 3,
    "village": "home"
    },
    {
    "name": "Freeze Spell",
    "level": 6,
    "maxLevel": 6,
    "village": "home"
    },
    {
    "name": "Poison Spell",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Earthquake Spell",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    },
    {
    "name": "Haste Spell",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    },
    {
    "name": "Clone Spell",
    "level": 5,
    "maxLevel": 5,
    "village": "home"
    },
    {
    "name": "Skeleton Spell",
    "level": 4,
    "maxLevel": 4,
    "village": "home"
    }
    ]
    }
    Wheel of Time. Check us out at www.discord.me/wotcoc for more information.

  7. #7
    New Bloke/Chick Poldas's Avatar
    Join Date
    May 2016
    Location
    Poland
    Posts
    45
    To SuperCell:
    1. There's an obvious bug with /players/{playerTag} gateway which is returning not available units for player in builder base. This definetly should not be resolved like people mensioned above because to be consistent with home base model the gateway simply should not return builder base units if they are not yet available for player.

    2. You also got a bug in API docs because /clans/{clanTag}/members gateway shows empty model/response in response class example.

    3. New gateway /clans/{clanTag}/currentwar has some lag with reading current settings of warlog from game because I've switched on and off warlog for clan and then tried the gateway couple of times with both settings and after I've switched off warlog to be not public I still could retrieve info from /clans/{clanTag}/currentwar even though I was not able to get data by /clans/{clanTag}/warlog gateway (403 response code as should be).

  8. #8
    There are bugs on the new achievements.
    "Next Generation Model". for 2 stars it stills says "unlock Sneaky Archer in the Builder Barracks".
    It should be "unlock Cannon Cart in the Builder Barracks"

    "Hidden Treasures". for 2 stars it still says "Rebuild Gem Mine".
    it should say "Rebuild Clock Tower".

    This will make it consistent with previous achievements.

    I see that for 3 stars it says those messages so maybe they are off by one?
    Wheel of Time. Check us out at www.discord.me/wotcoc for more information.

  9. #9
    Senior Member NattensNinjaerJakob's Avatar
    Join Date
    Aug 2016
    Location
    Denmark
    Posts
    223
    Quote Originally Posted by mahalleinir View Post
    It does.
    { "name": "Battle Machine", "level": 5, "maxLevel": 30, "village": "builderBase" }

    No, I didn't gem it...I just looked up the person with the highest trophies and figured they did
    Thanks, I wonder if 30 is really max level because when I look at the profile of people with the hero in level 5 the number 5 is in yellow flames like all other maxed out values.... Could it be a bug?!
    TH12/BH9. Heroes: 65/65/40/30. 106 of 108 achievement stars. Clan leader of 4 clans; Lvl 23, 19, 9 & 6.
    Obsessed since Jan 2013.


  10. #10
    Centennial Club
    Join Date
    Feb 2016
    Posts
    192
    Quote Originally Posted by NattensNinjaerJakob View Post
    Thanks, I wonder if 30 is really max level because when I look at the profile of people with the hero in level 5 the number 5 is in yellow flames like all other maxed out values.... Could it be a bug?!
    Yes the maxLevel are wrong in the API for new troops/heroes, they are at 16 for troops (instead of 10) and 30 for hero (instead of 5).
    Hey Chief!
    Checkout Clash of Stats! Free Live Clan Page, Historical Data, Clans Rankings and Players Rankings.
    Awesome feature you would like to see? Critics? Tell me here!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •