finished porting ian's golang api wrapper to nodejs