Adding scripts to joints / bend ?

Hello everyone,
I'm somewhat new to DAZ, I used to use Poser years ago (2003 - 2007), so there are *some* similarities.
I do have a programming background and I was wondering about the possibility of adding scripts to joints? I'd like for a model's shins to bend as if they're dangling and swaying their feet forward and back. So some sort of sin or cos function on the figure's bend modifier on the shins.
So I guess this is a loaded question:
1. where is the API
2. How could I apply a script like this (to get me started) - a rough example would be good. I can pick it up from there (If it's even possible).
Comments
1 http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/start#api_reference
2 it's not something I've done, but you can set a script to load and remain then in that script use the Connect command to link functions to signals (such as the joint updating) and perform any desired actions. I think there is a thread discussing this in general in https://www.daz3d.com/forums/categories/daz-script-developer-discussion
Thank you for the API reference guide!
As for #2, I'm not quite sure exactly what you mean by the connect command and signals. So Daz's scripting uses signals and slots? a signal is emitted by something such as code executing or a condition being met and then an action is performed?
Thank you very much for the help Richard!
Also - wow...
The API reference is full of holes. :(
Could anyone help steer me here as to what objects/functions need to be called in order to access the specific model and it's joint and modify the shin bend modifier over time?
Signals and slot are discussed here http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start
I would suggest looking through the sample scripts, which cover many of the basic operations. If you are going to use signals you should get a pointer to the item that triggered the signal, but in general you would use DzScene (the Scene global) to get a seelction or a named item, then get its modifiers or node children (bones) and their modifiers (see DzNode), then get the modifier's value channels or the node's particular posing transforms to manipulate. The DS 3 scripting guide has sections on the geoemtry pipe and scene hierarchy that may prove helpful.
Please bear in mnd that, for the scripting docs, we are reliant on the free tiem Rob is willing and able to devote to documentation - it's a huge task, and we don't want it to be a thankless one.
I'm sorry, well thank you Bob! It can be a huge undertaking, I completely understand.
And thank you Richard for providing me the signals and slots reference.
How funny - I work with a lot of Qt and it uses signals and slots too, it's how Qt's interface communicates with it's backend (Be it C/C++ or Python) on events. I just found out Daz uses Qt as well!
Yes, Daz Script derives from Qt Script.
Edit: I should add, with respect to those DS 3 docs, that figuers are no longer DzSkeleton but derivatives, though as long as you use inherits( "DzSkeleton" ) rather than isA( "DzSkeleton" ) you should be fine. Also, in the newer daz figures, the geometry belongs to the figure itself not to the bones.