Abtract API functionality to api.js