I think it makes sense for API to write specific subset with Add* classes, instead of *GETting* the rest of the values on the fly and hard-coding them within the key.
Take the Material Settings key for instance. If you add just a Self-illumination value for instance, the rest of the current values in a subset are also written to the key. What for?
(same is true by the way for manual timeline key assignment).
There should at least be a way to control it and have the ability to write a key with ALL current values, or with just the ONE specified.
(again, the same should be true for working with keys on a timeline manually).Example:
Assigned RED diffuse color on frame 1
Assigned some value of Self Illumination on frame 30
Assigned BLUE diffuse color on frame 60
Now, in order to get a smooth color transition between frames 1 and 60, I need to delete and recreate a Self Illumination key.
In more complex scenario with Python scripts you should do multiple passes and mind the order of execution to get things right.
(or come up with unnecessary routine and write values on every key).