Essentially each item slot button has an id which is it's position in the container so that's
self:GetID() The parent of the slot is the container (bag/bank slot) and it also has an id so that's
self:GetParent():GetID()
C_Container.GetContainerItemInfo uses those to return a table of information about what's in a given slot in a given container.
The hooked functions was from looking at the code for the item slot button (which is a standard torturous trail you can start with
/fstack find the button name on down through multiple inherited templates).
Which all starts with
exporting the code for the game UI and a good search tool or possibly
Gethe's on-line export.
warcraft.wiki.gg is the new home of API documentation. wowpedia will get more and more stale as time goes by