API:UnitClassToken

Get the class tokens of a unit.
mainClass, subClass = UnitClassToken( unit )
== Parameter ==
:;unit
::String - the UnitID (e.g. "target", "party1", "raid1", etc..) 
== Returns ==
:;mainClass
::String - current main class token of the specified unit. Returns nil if the specified unit does not exist (eg. "target" given but there is no target).
:;subClass
::String - current secondary class token of the specified unit. Returns nil if the specified unit does not exist; Returns nil if specified unit has no second class.
== Example ==
Print your current main class token
mainClass, subClass = UnitClassToken( "player" )
DEFAULT_CHAT_FRAME:AddMessage("My Class Token is : " .. mainClass );
UnitClassToken