Well thought I found a solution but I suspect it is bugged based on my results.
Functions I have been using:
Lua Code:
local numClasses = GetNumClasses()
local classDisplayName, classTag, classID = GetClassInfo(classIndex) -- classIndex ( 1 to numClasses )
local numSpecs = GetNumSpecializationsForClassID(classID)
local specID, specName, description, specIcon, background, role = GetSpecializationInfoForClassID(classIndex, specIndex) -- classIndex ( 1 to numClasses ) specIndex ( 1 to numSpecs )
local spells = { GetSpecializationSpells(specID) } -- returns a list of spellID,levelLearned values
local spellName = GetSpellInfo(spellID)
local spellLink = GetSpellLink(spellID)
-- This I suspect is the correct one to use to look at the Player/Inspected talents
--local talentID, talentName, talentIcon, selected, available = GetTalentInfo(tier, column, specIndex)
-- This I suspect is the correct one to use to look at any Spec but for some reason it looks at the specIndex rather than the specID. I tried both and only the former works and grabs the talents for the active player's talents and I suspect the inspected player's talents as requested
local talentID,talentName,talentIcon,selected,available = GetTalentInfoBySpecialization(specIndex,tier,column)
In these two functions tier is 1 to MAX_TALENT_TIERS and column is 1 to NUM_TALENT_COLUMNS as currently defined in the Blizzard Talent Frame source code.
The reason I suspect these are faulty is because I cannot believe that they have 2 differently named functions with the same parameters ( albeit in a different order ) that return the same values.
local talentLink = GetTalentLink(talentID)
All of these functions work as expected apart from the GetTalentInfoBySpecialization which I suspect isn't working right.
EG.
This is an example output if I used specID in that function for each tier/column
Lua Code:
classTag = DRUID - specIndex = 1 - specID = 102 - specName = Balance - talentID = nil - talentName = nil
classTag = DRUID - specIndex = 2 - specID = 103 - specName = Feral - talentID = nil - talentName = nil
classTag = DRUID - specIndex = 3 - specID = 104 - specName = Guardian - talentID = nil - talentName = nil
classTag = DRUID - specIndex = 4 - specID = 105 - specName = Restoration - talentID = nil - talentName = nil
This is an example output for the last talent in each of the specIndex's for the players class regardless of which class/spec is being requested.
Lua Code:
classTag = DRUID - specIndex = 1 - specID = 102 - specName = Balance - talentID = 21673 - talentName = Saved By The Light (Holy Spec for my active Paladin Class - which is my 2nd talent spec)
classTag = DRUID - specIndex = 2 - specID = 103 - specName = Feral - talentID = 21203 - talentName = Holy Shield ( Protection Spec for my active Paladin Class - 1st talent spec )
classTag = DRUID - specIndex = 3 - specID = 104 - specName = Guardian - talentID = 21672 - talentName = Final Verdict ( suspect Retribution Spec for Paladin class - not chosen as a talent )
classTag = DRUID - specIndex = 4 - specID = 105 - specName = Restoration - talentID = nil - talentName = nil - Paladin's don't have 4 talent choices.
These 3 paladin spec talents are displayed for each class's spec selections. A quick jump onto a few other classes and the appropriate loaded characters talents are displayed instead of the requested specIndex's talent section.