How do I find the code for editing an F curve?

Simply put, what I’m looking to be able to do is to make a toggle button on the graph editor which will apply any motion in the view-port on the given object to all selected frames. I can see in the python what a movement looks like in code but I haven’t the slightest clue (about most of python) so I’m not sure where to get the code that applies the change into the objects animation data. I looked over the API but it’s not ripe with explanations of the types…

What I’m trying to do seems simple enough, it’s just propagating a standard blender operation on a keyframe to all selected at once. Maybe this is very complex, I don’t know.

I can wrap my head around the basics of putting together an addon… but I could really use some pointers on how to do this.

First addon I need to make… working on a project and I need to be able to iterate on many keyframes at once, so using the channel editor is just not an option, far too slow and tedious.