If you don't care, all you need is a little bit more code, like this:
var viz = window.tableau.vizs;
You'd call the function above from the onClick of a button, the onChange of a combo-box, etc.
If you want to use the latest / greatest API , you can find it here:
Hope this helps.