Blender RGBCurve adding new points?

I got this code and a material called Material:

import bpy
mat_name='Material'
mat = (bpy.data.materials.get(mat_name))
mat.use_nodes=True
a=mat.node_tree.nodes.new('ShaderNodeRGBCurve')
a.location=(0,0)

I want to add several points via script to the RGB Curve as doing it manually sucks (over 900 points!), but I have no idea how to do this. I found this: https://www.blender.org/api/blender_python_api_2_78a_release/bpy.types.ShaderNodeRGBCurve.html?highlight=rgb%20curve#bpy.types.ShaderNodeRGBCurve
But I do not understand the api at all, there is just no explanation! Can someone help me pls?

a.mapping.curve[3].points.new(position, value)

the curve array is:
0 = R
1 = G
2 = B
3 = C

Thank you very much! :smiley: