adding api function calls

Add api calls and async.js