- added outline of main api request function to api.js