[Addon] WoW Addon API


my name is Alex/Noxikon and i develop a Addon for a friend.
While i was developed the Addon i collect some questions where i dont find an answer in the web.

  1. Is there any officel dokumentation about the WoW Addon Api (lua)?
  2. Maybe know this anyone: Is there any way to get the Spec of a user via userID? That i know the hunter XXX has id YYY and then i can call GetSpecOfUser(YYY) and this returns me he is a MM Hunter or somehthing.
  3. Same with item level - is there any function to get the item level from a user?

Important the questions are for the INGAME WOW API where you use when you develop addons with lua.

Thanks for response and have a create day!

You should try posting in the UI forum: UI and Macro - World of Warcraft Forums

Good luck!

1 Like
  1. Official API information is accessed via the in-game /api command. Unofficial documentation can be found here: https://wowpedia.fandom.com/wiki/World_of_Warcraft_API
  2. You cannot use an ID value to get spec info; you can only get the specialization of another player when “inspecting” them. This can get you started:
local f = CreateFrame("frame") 
f:SetScript("OnEvent", function (self, event, ...) 
	if (event == "INSPECT_READY") then 

Then every time you want to get the target’s spec, run the following:

  1. Same as above, but swap GetInspectSpecialization("target") for C_PaperDollInfo.GetInspectItemLevel("target"). Note: The function result seems to be occasionally a little inaccurate in my own testing, but it’s at least close.

There’s a great beginner’s guide that I found very useful here: https://www.wowhead.com/guide/comprehensive-beginners-guide-for-wow-addon-coding-in-lua-5338