See my answer here:
The main documentation is here, other information should be looked for in the javadoc or in example plugins.