1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

Info Wynncraft Public Api

Discussion in 'Rules & Information' started by Elements, May 18, 2016.

  1. Yuno F Gasai

    Yuno F Gasai Forum God FW

    Messages:
    12,197
    Likes Received:
    25,650
    Trophy Points:
    229
    Guild:
    Minecraft:
    If both aren't working then the API is likely to have a problem
     
  2. Dohdo

    Dohdo I'm back. Cancer in it's purest form.

    Messages:
    3,292
    Likes Received:
    2,197
    Trophy Points:
    125
    Guild:
    Minecraft:
    Or being updated

    hype
     
  3. colin350

    colin350 Supreme Badass Builder CMD HERO QA Website Team

    Messages:
    518
    Likes Received:
    1,121
    Trophy Points:
    91
    Creator Karma:
    Guild:
    Minecraft:
    My claim was that although wynnapps uses the api to get item data, you cannot say for sure that it's broken because the API isn't working. You should check if the item guide on wynncraft.com is having issues, and if it is, then you can deduce an API error. You could've also sent a get request to the itemdb API to confirm as well (or used curl via cmd line).

    It was in fact broken, and I notified Jumla of it (and the other typos which exist). You shouldn't assume that there's an api update.
     
  4. Dohdo

    Dohdo I'm back. Cancer in it's purest form.

    Messages:
    3,292
    Likes Received:
    2,197
    Trophy Points:
    125
    Guild:
    Minecraft:
    It's being touched tho

    B/c code never does what it isnt told to do, and therefore, something happened
     
  5. dukioooo

    dukioooo ex Featured Wynncraftian

    Messages:
    1,440
    Likes Received:
    568
    Trophy Points:
    67
    Guild:
    Minecraft:
    The API was updated to include corkus items, that happend...
     
  6. Dohdo

    Dohdo I'm back. Cancer in it's purest form.

    Messages:
    3,292
    Likes Received:
    2,197
    Trophy Points:
    125
    Guild:
    Minecraft:
    That isn't code sided though, because then it would have gotten problems on the Wynnter or Gameplay updates
     
  7. colin350

    colin350 Supreme Badass Builder CMD HERO QA Website Team

    Messages:
    518
    Likes Received:
    1,121
    Trophy Points:
    91
    Creator Karma:
    Guild:
    Minecraft:
    Sya, to my knowledge, hasn't confirmed whether or not the wynnapps code has been modified. So you shouldn't have ruled that out in the first place.

    There was no update to the API. I can confirm it. Why did it malfunction? Well the main database most likely malfunctioned (based on your argument anyways). The API reads from the main database.

    You're argument doesn't prove that the API is being updated. If anything, you could've said: "Because Wynnapp's source hasn't been modified and there is an error as a result to sending a GET request to the itemdb API, I can deduce that the issue is stemming from Wynncraft's API. However, I cannot say whether there has been a modification to the API's source, or if there was a modification to the database in which the API is reading from"

    Also gg trying to tell me how code works. If I didn't know how it worked, I don't think I'd be hired as one of Wynncraft's developers.
     
    Last edited: May 21, 2017
  8. CocoTheCorgi

    CocoTheCorgi A Corgi Builder

    Messages:
    161
    Likes Received:
    111
    Trophy Points:
    49
    Creator Karma:
    Minecraft:
    Dont under estimate Colin. He knows what he is doing.
     
  9. xmangotreesx

    xmangotreesx The only mango who lives on trees. VIP

    Messages:
    187
    Likes Received:
    47
    Trophy Points:
    64
    Minecraft:
    Interesting to see what creations people make from this. :grimacing:
     
  10. Yuno F Gasai

    Yuno F Gasai Forum God FW

    Messages:
    12,197
    Likes Received:
    25,650
    Trophy Points:
    229
    Guild:
    Minecraft:
    Last time I talked to him sya said he is to busy with school so he won't be working on wynnapps.
    This was a while ago tho
     
  11. Mckl

    Mckl Well-Known Adventurer

    Messages:
    97
    Likes Received:
    34
    Trophy Points:
    51
    Minecraft:
    This is definitely not true, there's been many many times that the API has to be manually updated. If the API actually read from the main database we would never have these problems of it being outdated.

    This has nothing to do with Wynnapps, check the example in the main post, supplying a category produces an error.
    https://api.wynncraft.com/public_api.php?action=itemDB&category=chestplate
     
  12. Yuno F Gasai

    Yuno F Gasai Forum God FW

    Messages:
    12,197
    Likes Received:
    25,650
    Trophy Points:
    229
    Guild:
    Minecraft:
    my post was a response to colin
     
  13. colin350

    colin350 Supreme Badass Builder CMD HERO QA Website Team

    Messages:
    518
    Likes Received:
    1,121
    Trophy Points:
    91
    Creator Karma:
    Guild:
    Minecraft:
    Well first off, I already curled it and confirmed an error. I was explaining that his claim as to why the API was broken was not well thought through.

    It doesn't have main database access per say, but a duplicate of it. I'm also pretty sure items are managed in a separate database, and that database is updated regularly.
     
    dukioooo likes this.
  14. dukioooo

    dukioooo ex Featured Wynncraftian

    Messages:
    1,440
    Likes Received:
    568
    Trophy Points:
    67
    Guild:
    Minecraft:
    Found some duplicate items in the API:

    Code:
    Ra is duplicate - files are identical
    Rat Skull is duplicate - files are identical
    Vertebra is duplicate - files are identical
    Witherhead's Bow is duplicate - files are identical
    Spiderweb String is duplicate - files are identical
    Scorpion Tail is duplicate - files are identical
    Arakadicus' Body is duplicate - files are identical
    Silkwrap is duplicate - files are identical
    Spider's Eye Pendant is duplicate - files are identical
    Web Spitter is duplicate - files are identical
    Webstring is duplicate - files are identical
    Alkatraz is duplicate - files are different
    Apocalypse is duplicate - files are identical
    Fatal is duplicate - files are identical
    Freedom is duplicate - files are different
    Gaia is duplicate - files are different
    Grimtrap is duplicate - files are different
    Guardian is duplicate - files are different
    Inferno is duplicate - files are identical
    Lament is duplicate - files are identical
    Monster is duplicate - files are identical
    Archangel is duplicate - files are different
    Pure is duplicate - files are identical
    Weathered is duplicate - files are different
    if the files are different the only thing that changes is the lore.
     
  15. VerifyError

    VerifyError Travelled Adventurer VIP

    Messages:
    33
    Likes Received:
    5
    Trophy Points:
    16
    Minecraft:
    I really like this Item named "YAMLException":
    Code:
    {
      "name": "YAMLException",
      "reason": "duplicated mapping key",
      "mark": {
        "name": null,
        "buffer": "name: Spider Bracelet\ntier: Unique #Normal, Unique, Rare, Legendary, Set\nset: null #Value within sets.yml, do not touch\nsockets: 0 #Amount of powder slots \naccessoryType: Bracelet #ring, bracelet, necklace\naddedLore: null #only for legendary\ndropType: never\nmaterial: '190'\nidentified: true\ndropType: dungeon\nrestrictions: Untradable\n\n##Health\nhealth: 0\nfireDefense: 0\nwaterDefense: 0\nairDefense: 0\nthunderDefense: 0\nearthDefense: 5\n\n##Requirements\nlevel: 19\nquest: null\nclassRequirement: null #null, Mage, Assassin, Archer, Warrior\n\nstrength: 0\ndexterity: 0\nintelligence: 0\nagility: 0\ndefense: 0\n\n##IDs\nhealthRegen: 0\nmanaRegen: 0\nspellDamage: 0\ndamageBonus: 0\nlifeSteal: 0\nmanaSteal: 0\nxpBonus: 0\nlootBonus: 0\nreflection: 0\n\nstrengthPoints: 0\ndexterityPoints: 0\nintelligencePoints: 0\nagilityPoints: 3\ndefensePoints: 0\n\nthorns: 0\nexploding: 0\nspeed: 0\nattackSpeedBonus: 0\npoison: 30\nhealthBonus: 0\nsoulPoints: 0\nemeraldStealing: 0\n\nhealthRegenRaw: 0\nspellDamageRaw: 0\ndamageBonusRaw: 0\n\nbonusFireDamage: 0\nbonusWaterDamage: 0\nbonusAirDamage: 0\nbonusThunderDamage: 0\nbonusEarthDamage: 0\n\nbonusFireDefense: 0\nbonusWaterDefense: 0\nbonusAirDefense: 0\nbonusThunderDefense: 0\nbonusEarthDefense: 0\n\u0000",
        "position": 308,
        "line": 9,
        "column": 17
      },
      "message": "duplicated mapping key at line 10, column 18:\n    dropType: dungeon\n                     ^",
      "category": "accessory"
    }
    
     
    NicBOMB, Alexandress and LarzLapiz like this.
  16. Ryuu

    Ryuu bamboozle insurance ✎ Artist VIP+

    Messages:
    653
    Likes Received:
    8,369
    Trophy Points:
    159
    Guild:
    Minecraft:
    The official item guide has thumbnails for each item. Is it possible that we could get the endpoint for the sprite urls? ;D
     
    King Kaelan likes this.
  17. dukioooo

    dukioooo ex Featured Wynncraftian

    Messages:
    1,440
    Likes Received:
    568
    Trophy Points:
    67
    Guild:
    Minecraft:
    It seems like it's based on the item material with some defaults:
    Code:
    if (data[e].material && "" != data[e].material) {
    
        var s, n, o = data[e].material; - 1 != o.indexOf(":") ? (s = o.substring(0, o.indexOf(":")), n = o.substring(o.indexOf(":") + 1)) : s = o;
        var c = ".item-" + s + (n ? "-" + n : "");
        selectorExists(c) && (r = '<div class="ingameitem item-' + s + (n ? "-" + n : "") + '"></div>')
    } else {
        switch (data[e].type) {
            case "Bow":
                r = '<div class="ingameitem item-261-0"></div>';
                break;
            case "Wand":
                r = '<div class="ingameitem item-280-0"></div>';
                break;
            case "Spear":
                r = '<div class="ingameitem item-256-0"></div>';
                break;
            case "Dagger":
                r = '<div class="ingameitem item-359-0"></div>';
                break;
            case "Helmet":
                r = '<div class="armoritem armor-' + data[e].armorType.toLowerCase() + '-helmet"></div>';
                break;
            case "Chestplate":
                r = '<div class="armoritem armor-' + data[e].armorType.toLowerCase() + '-chestplate"></div>';
                break;
            case "Leggings":
                r = '<div class="armoritem armor-' + data[e].armorType.toLowerCase() + '-leggings"></div>';
                break;
            case "Boots":
                r = '<div class="armoritem armor-' + data[e].armorType.toLowerCase() + '-boots"></div>';
                break;
            case "accessory":
                r = '<div class="ingameitem item-189-0"></div>'
        }
        switch (data[e].accessoryType) {
            case "Bracelet":
                r = '<div class="ingameitem item-188-0"></div>'
        }
    }
    source: https://wynncraft.com/js/dist/help.min.js

    then for each item they already have the css class set up here: https://wynncraft.com/css/style.css (search .item- it's in the second group of results)
    ________________________________
    EDIT: in the css you can find the main images uri and the gifts uri
     
    colin350 likes this.
  18. bob10234

    bob10234 Wynncraft discord owner VIP

    Messages:
    508
    Likes Received:
    199
    Trophy Points:
    70
    Minecraft:
    Are you working on an item guide that actually works?
     
  19. colin350

    colin350 Supreme Badass Builder CMD HERO QA Website Team

    Messages:
    518
    Likes Received:
    1,121
    Trophy Points:
    91
    Creator Karma:
    Guild:
    Minecraft:
    An API dependent item guide which actually works is reliant upon an API which actually works 100% of the time. In fact the logic used in Wynnapps' calculations are fantastic.
     
  20. dukioooo

    dukioooo ex Featured Wynncraftian

    Messages:
    1,440
    Likes Received:
    568
    Trophy Points:
    67
    Guild:
    Minecraft:
    Yep, already done it actually... I'm just working on something else now and I hope to release it soon
    ________________________________
    Not if you actually don't use wynncraft API 100% of the time :)
     
    colin350 likes this.

Share This Page