Blizzard API

Clarification from a Blue, please: Given Blizzard deliberately, voluntarily allows certain actions via it’s own API, does that mean addons using said API are safe to use, given Blizzard has the ability to change or remove API if it doesn’t like what it can do?

Most addons that utilize Blizzard’s API are safe, but ones that attempt to modify it in any way are a big no-no.

If a popular addon is doing something Blizzard doesn’t like, they’ll change the API accordingly.

1 Like

If it’s available in the API, Blizzard is saying “go ahead and use it.”

That’s the way I see it anyways.

But I’ve only written one add-on.

What the heck is api

From wikipedia:

1 Like

Ok that is to long to read

So, just the first part, it’s the basic code that allows addons to interact with the game.

1 Like

Oh that is pretty important for deadly boss mods

Consider it functionality Blizzard exposes to addon(…consider Blizzard’s UI to be Blizzard Addons).

There could be a killPlayer( name goes here) exposed, and I could make an addon that exposes a button that executes killPlayer( “Ijilijil” ) that kills you if you’re in range.

Then Blizzard comes along and goes “wait what, this is no bueno” so they remove that function(…or make it only accessible to themselves) and suddenly my addon with it’s wonderful button ceases to function.

And I am sad. And you get to live.

:frowning:

there’s a list of the different things you can do with it here (though im not sure if its updated)
https://wowwiki-archive.fandom.com/wiki/World_of_Warcraft_API

basic rule is that as long as all files for the addon reside in the /interface/addons/ folder and not outside it in any way it generally will work just fine. If there is a .exe file then run away quickly.

I appreciate the actual help everyone offered instead of being rude you guys are mvp

Blizzard control what data we can get and use by using the API and the number of requests you can make to it.
They can stop any query you make and revoke your key at any time if you abuse it.

~https://develop.battle.net/documentation

An API is a part of a program that other programs can interact with.

Blizzard, like most developers, most likely wrote WoW in a way that their developers can extend upon. This API however would be private and only available to anyone with access to the codebase.

However, Blizzard allowed many functions from their internal code base to be used by addon developer. These functions are a public API that anyone can have access to (though in some situations they may need like a public key or something for access.)

Here’s a piece of code from an addon I wrote. It’s a very simple addon that goes through all the anima items in your bags and shows how much anima you’re holding onto that you can later deposit.

local function getAnimaItems()
    local inventoryAnimaItems = {}
    for bagID=0, 4 do
        for bagSlot=0, GetContainerNumSlots(bagID) do
            _, itemCount, _, _, _, _, itemLink = GetContainerItemInfo(bagID, bagSlot);
            if itemLink ~= nil then
                local itemInfo = getItemFromItemString(itemLink)
                if C_Item.IsAnimaItemByID(itemInfo) then
                    table.insert(inventoryAnimaItems,{info=itemInfo, count=itemCount})
                end
            end
        end
    end
    return inventoryAnimaItems;
end

This function simply creates a list of inventory items that are anima items.

C_Item.IsAnimaItemByID(itemInfo) is a function from the Blizzard API that I have access to that I can use to determine if an item is an anima item. There are a few other API functions in that function as well.

In essence, an API is a list of functions and properties that a programmer makes available to other programmers for use.

1 Like

some of these functions are really useful for normal players like

AddTrackedAchievement(achievementId)

you can use it to track achievements which are not listed in the achievement window. An example would be keystone master you can use the command below to track your progress.

/run AddTrackedAchievement(14532)

Dang I really don’t like LUA code.

All those _,'s are making me twitch.

1 Like

I wasn’t a fan of using it lol.