1. Is it possible to scan another player's stats and determine their current attack / spell power and defense?

    I recently got an addon that can scan another player's items and display their ilvl and secondary stat priority in a tooltip. That's nice, but I thought it would be neat if I could extend it to also display their current ap, sp, and def values (just for curiosity's sake really, since I've sometimes wondered how my characters stack up against the other random people I've met in bgs/lfd while leveling). Of course, this might be somewhat complicated unless you can get those values directly from the client (eg. enh shaman gets +sp from agi), but if I could at least get base stats + gear bonuses, that would be a start.

    I already checked the API, but nothing there seemed to be particularly useful (nothing but the Unit functions can get values pertaining to other players/targets, and those seem to be broken and pretty outdated). I'm new to addon development (and lua), but I have quite a bit of programming experience, so I doubt that will be a problem.

    So, is this possible? Any help / advice would be appreciated. Thanks!

    Can the default UI display the information when you inspect the user? If so, then that should be a pointer as to how to do it.