move api to new version and add tests

Unless there's at least two projects that you could list here, pure JS.
I'm not sure why we should move from what we had before.