Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Archive:WoWWiki:API notation and conventions

From WoW Classic Wiki

Template:Stub/Begin It has been suggested that this article or section be merged with WoWWiki:How to edit API pages.

Template:Stub/End

Example API listing

  • SetMapZoom(continentIndex[, zoneIndex])   - Sets the current world map to a specific continent and optionally zone.
This function takes one or two arguments. The square brackets indicate that the second argument is optional.


Example API with string argument

The quotes around the arguments in this function means that the parameter is a string. It does not mean that the argument is literally "channel" or "name".


Example API with described data type (string)

  • TargetUnit("unit")   - Selects the specified id as the current target.


Example of an UI Object (widget) method

This example shows that the SetAllPoints() function is called as a method function on a LayoutFrame object. The arguemnt is either a frame, or a frame name (string).


: [[API SetMapZoom|SetMapZoom]](continentIndex[,zoneIndex])   - Description
Pages describing individual API functions are named on the form "API FunctionName" (with no argument information).
: [[API LayoutFrame GetHeight|LayoutFrame:GetHeight]]()   - Description
Pages describing individual widget methods are named on the form "API ObjectType FunctionName" (with no argument information).


  • PROTECTED - function exists, but is protected for Blizzard only code.
If the page exists, put Template:T2link at the top
  • REMOVED - indicates that the function has been removed from the API.
Removed functions should only be listed in Category:World of Warcraft API/Removed Functions
If the page exists, put Template:T2link at the top
  • UI - indicates that the function is provided by the FrameXML UI code, rather than the core API.
If the page exists, put Template:T1link at the top

Data and Argument Types

The API uses special values for some function arguments, the commonly used types are:

actionSlot - Action button slot numbers (120 in total)
auctionSortId - An identifier for sorting columns in the auction house.
auctionTypeId - An identifier specifying which type of auction to operate on.
bagId - Numbers representing bags you carry, bank bags, bank window, etc
buffId - Numbers for indexing buffs
chatTypeId - An identifier for the different chat destination types.
emoteToken - System names of voice/action emotes
inventorySlotName - Names of inventory slots.
inventorySlotId - Current mappings of slot names to numbers. May change.
itemEquipLoc - String representation of where an item may be equipped ("INVTYPE_HEAD", etc)
itemString - An item id with data about enchants, "of" type bonuses, and the item's creator.
itemLink - A string that will be clickable if shown in-game, contains an itemString.
itemType - String classification of an item, ("Armor", "Consumable", etc)
lootMethod - An identifier for the different looting methods (group loot, need before greed, etc)
playerName - The name of a player.
raidIndex - A number between 1 and 40
standingId - Numeric encoding of faction standing.
unitId - An identifier which specifies one of the units the API may reference ("target", "party1", etc)


Category:API Types has the full list. (Though if something there is not available here: please list it!)


shortcut iconSee Also: How to edit API pages