API docs and reference client

The reference client needs more inline docs, but is working, with a simple example. 

The api.md is also available https://gist.github.com/dannycoates/5958762 to review the rendered version.