Add API documentation

Signed-off-by: Alexander Berntsen <alexander@plaimi.net>
Signed-off-by: Stian Ellingsen <stian@plaimi.net>
Reviewed-by: Stian Ellingsen <stian@plaimi.net>