Add an API

Far from finished, but it's a start. Includes a /block/ call. Closes #6