Some further documentation.
A bit more generic example code.