docs(lib): document the API

closes #20