document API method and add assertion
update library documentation
Merge pull request #58 from gordon/master

Document undocumented API method