WoW:API GetAuctionItemClasses: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (typo)
m (Move page script moved page API GetAuctionItemClasses to API GetAuctionItemClasses without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub/API}}
{{wowapi}}
'''GetAuctionItemClasses()'''<br>
'''Parameters:''' none<br>
'''Returns:''' n return values, each of which is a major auction category. Right now "Weapon", "Armor", "Container", "Consumable", "Trade Goods", "Projectile", "Quiver", "Recipe", "Reagent", "Miscallaneous"


----
Gets a list of the auction house item classes.
;''Example''
  itemClasses = { GetAuctionItemClasses() }
  local a,b,c,d,e,f,g,h,i,j = GetAuctionItemClasses();
 
DEFAULT_CHAT_FRAME:AddMessage(a.." "..b.." "..c.." "..d.." "..e.." "..f.." "..g.." "..h.." "..i.." "..j);
 
== Arguments ==
None
 
 
== Returns ==
:; A list (not a table) of localized item classes
:;* "Weapon"
:;* "Armor"
:;* "Container"
:;* "Consumable"
:;* "Glyph"
:;* "Trade Goods"
:;* "Projectile"
:;* "Quiver"
:;* "Recipe"
:;* "Gem"
:;* "Miscallaneous"
:;* "Quest"
 
== Example ==
local itemClasses = { GetAuctionItemClasses() };
if #itemClasses > 0 then
  local itemClass;
  for _, itemClass in pairs(itemClasses) do
    DEFAULT_CHAT_FRAME:AddMessage(itemClass);
  end
end
 
<big>'''Result'''</big>


;''Result''
This will give you the names of every category, in the client's language.
This will give you the names of every category, in the client's language.
:a = "Weapon"
:b = "Armor"
:c = "Container"
:d = "Consumable"
:e = "Trade Goods"
:f = "Projectile"
:g = "Quiver"
:h = "Recipe"
:i = "Reagent"
:j = "Miscellaneous"
----

Latest revision as of 04:45, 15 August 2023

WoW API < GetAuctionItemClasses

Gets a list of the auction house item classes.

itemClasses = { GetAuctionItemClasses() }


Arguments[edit]

None


Returns[edit]

A list (not a table) of localized item classes
  • "Weapon"
  • "Armor"
  • "Container"
  • "Consumable"
  • "Glyph"
  • "Trade Goods"
  • "Projectile"
  • "Quiver"
  • "Recipe"
  • "Gem"
  • "Miscallaneous"
  • "Quest"

Example[edit]

local itemClasses = { GetAuctionItemClasses() };
if #itemClasses > 0 then
  local itemClass;
  for _, itemClass in pairs(itemClasses) do
    DEFAULT_CHAT_FRAME:AddMessage(itemClass);
  end
end

Result

This will give you the names of every category, in the client's language.