wip: Add rest api

Close #29
Implements #30 
Why not just `out.once('finish', callback);`?