confused about where to learn "freestyle"

I’m a bit confused about where to learn the freestyle API. I’ve tried finding the package in the Blender API reference, but failed.
Then finally found it in the 2.67 version of the API reference here, after googling it: http://www.blender.org/documentation/blender_python_api_2_67_release/freestyle.html

I’m a bit confused. Is there some tutorial for people wanting to write their own freestyle modules? List of classes, functions and variables don’t tell much.
I also viewed some modules which come with Blender, but they are not documented.

BTW, most modules which come with Blender use some imports which I can’t find in the API docs and can’t import inside Blender myself to use dir() or help() on them, Blender says they don’t exist.
For example, taken from one of the modules:

from shaders import pyMaterialColorShader

I can’t find “shaders” anywhere, and when I try doing “import shaders” in the Blender python console, I get an error that it was not found.

So I’m pretty confused, help me out guys.

I just want to write a module that adds outlines which use the diffuse colors of their mesh.

The API docs aren’t really useful as a starting point indeed. But check these out:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/FreeStyle#Python_Scripting_Mode
http://wiki.blender.org/index.php/User:Flokkievids/Freestyle/Python_scripting_mode
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Freestyle/Links#Tutorials

You should have a look at the mentioned scripts!

Not sure where this Shader is supposed to be imported from, found these:

>>> [s for s in dir(freestyle) if “shader” in s.lower()]
[‘BackboneStretcherShader’, ‘BezierCurveShader’, ‘CalligraphicShader’, ‘ColorNoiseShader’, ‘ColorVariationPatternShader’, ‘ConstantColorShader’, ‘ConstantThicknessShader’, ‘ConstrainedIncreasingThicknessShader’, ‘GuidingLinesShader’, ‘IncreasingColorShader’, ‘IncreasingThicknessShader’, ‘PolygonalizationShader’, ‘SamplingShader’, ‘SmoothingShader’, ‘SpatialNoiseShader’, ‘StrokeShader’, ‘StrokeTextureShader’, ‘TextureAssignerShader’, ‘ThicknessNoiseShader’, ‘ThicknessVariationPatternShader’, ‘TipRemoverShader’, ‘fstreamShader’, ‘streamShader’]

ThanksCoDEmanX