Implement blob api

Fixes #129 ready for review.