If I want to identify that an item is a tradeskill mat, I can check the class ID to see if it’s equal to Enum.ItemClass.Tradegoods:
local link = C_Container.GetContainerItemLink(bag, slot)
local classID, subclassID = select(12, GetItemInfo(link))
if (classID == Enum.ItemClass.Tradegoods) then
do something...
But if I want to go further and identify what type of crafting material it is, such as Leather or Cloth, I can’t find a similar Enum for the subclassID in this list of Enums. I could just print the subclassID values for different crafting mats & hard code some constants but I’d really rather use something from the API so the code won’t be fragile.
Is there some other resource I should be looking at for API constants? Or is there another way to do this that’s better than looking at the subclassID?