I actually just posted about looking for API wrappers. I started on my own wrapper, also called safe_api.js, but I’d rather collaborate than write it all by myself. Here’s my thread:
I will give your code a look a little bit later today and add any comments to GitHub.