I've looked at the ClientAPI document, numerous times and numerous times I've been frustrated looking at it, I was really hoping to get someone to create some short piece of code that says something along the lines of "Put this here like this 'dnn.getVar(324234);' and then do this, blah, blah, blah ... so on and so forth"
Did you read Page 6 of the document?
An example of where this functionality is used is in the maximize/minimize client script. Since in an UpLevel rendering of a module with the maximize/minimize functionality a round trip to the server is not done and the icon representing the plus and minus sign can be customized, the client will need to know what icons to display when clicked. This information is set on the server side and passed to the client by the following code.
ClientAPI.RegisterClientVariable(Page, "min_icon_" & objPortalModule.ModuleId.ToString, sModulePath & [MinIcon], True)
Then it is accessed on the client side by the following code.
sMinIcon = dnn.getVar('min_icon_' + sModuleID);
Is this not what you are asking for?
rather than pointing to the documentation on the API
What is the documentation for then if not to show you how to use it? The document states this is how you use it, and here is a sample of where in the core it is used.
I had the dnn.getVar added in there and then I took it out after not being able to get the clientAPI to play nicely with my code
You take it out, and ask why its not working??? How are you supposed to get help, if you don't post the part of the code that you are having trouble with?