GetCollectibleInfo
ESO Lua API function — used by 94 of the 3,030 addons we indexed (combined 10,803,170 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetCollectibleInfo(integer collectibleId)Returns: string name, string description, textureName icon, textureName deprecatedLockedIcon, bool unlocked, bool purchasable, bool isActive, categoryType, string hint
Real usage — from LibSets (All set items ingame & preview. lua API + excel sheet)
local collectibleId = GetCollectibleIdFromType(COLLECTIBLE_CATEGORY_TYPE_DLC, collectibleIndex)
local collectibleName, _, _, _, _ = GetCollectibleInfo(collectibleId) -- Will return true or false. If the user unlocked throughShort excerpt from the shipping addon LibSets (All set items ingame & preview. lua API + excel sheet) — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.