If you are an author of a trade skill add-on you can register your add-on with
Armory by calling:

    Armory:RegisterTradeSkillAddOn("your_addon_name", 
        unregister_update_event_function, register_update_event_function);

For example:

    Armory:RegisterTradeSkillAddOn("ATSW", 
        function() ATSWFrame:UnregisterEvent("TRADE_SKILL_UPDATE"); end, 
        function() ATSWFrame:RegisterEvent("TRADE_SKILL_UPDATE"); end 
    );

This will prevent Armory triggering TRADE_SKILL_UPDATE events when it updates
the profession data. Armory users can opt for a simplistic profession display
in which case registration is not needed (this can be achieved by disabling the
option 'Enable subclass and slot filters' in Armory). But users will appreciate
it when you register your add-on with Armory.


If you want to use Armorys data youll need to call its methods to retrieve it.
There is no official API but Armory uses the same method names as their Blizzard
counterparts, e.g. Armory:UnitClass() will return the same information as
Blizzards UnitClass() but then for the currently selected character.

Most likely you want to iterate through the stored inventory data. To accomplish
this you need to save the current character, loop through the data and restore
the saved character when youre done.
You can use profiles to save, select and restore the selected character.

Your basic layout will be:

    local currentProfile = Armory:CurrentProfile();
    for _, realm in ipairs(Armory:RealmList()) do
        for _, character in ipairs(Armory:CharacterList(realm)) do
            Armory:LoadProfile(realm, character);
            ...
        end
    end
    Armory:SelectProfile(currentProfile);

which will respect the faction filter that limits the selectable characters to the 
current realm and faction.

As an alternative you can also use:

    local currentProfile = Armory:CurrentProfile();
    for _, profile in ipairs(Armory:Profiles()) do
        Armory:SelectProfile(profile);
        ...
    end
    Armory:SelectProfile(currentProfile);

which will include all realms and factions .

The SelectProfile() method uses an associative array that holds the realm and
character names (respectively profile.realm and profile.character).

The following example will count a specific item in the bags of your alts. It also
shows the use of some other methods that may be useful.

function Armory_GetItemCount(itemid)
    local currentProfile = Armory:CurrentProfile();
    local currentRealm = GetRealmName();
    local count = 0;
    local itemId, itemCount;

    if ( not (Armory and Armory:HasInventory()) ) then
        return 0;
    end

    for _, character in ipairs(Armory:CharacterList(currentRealm)) do
        Armory:LoadProfile(currentRealm, character);
        -- only get the count for alts
        if ( not Armory:IsPlayerSelected() ) then
            for id = BACKPACK_CONTAINER, NUM_BAG_SLOTS do
                for index = 1, Armory:GetContainerNumSlots(id) do
                   itemId = (Armory:GetContainerItemLink(id, index) or ""):match("item:(%d+)");
                   if ( itemId == itemid ) then
                       _, itemCount = Armory:GetContainerItemInfo(id, index);
                       count = count + (itemCount or 0);
                   end
               end
            end
        end
    end

    Armory:SelectProfile(currentProfile);

    return count;
end

For instance Armory_GetItemCount("6948") will return the total number of hearthstones
possessed by your alts (useless information but you get the picture).