title: Process an array of API calls sequentially with Bluebird.mapSeries
body: <p>What I've been trying is to process API calls sequentially, which are pushed into an array.</p>
  
  <pre><code>function resolveApi(callback) {
    return new Promise(function(resolve, reject) { resolve(callback) });
  }
  
  function callApi(){
  
      var promises = [];
      promises.push(resolveApi(Restangular.one("api/blahblah",{/*input data*/})));
      promises.push(resolveApi(Restangular.one("api/another/api",{/*input data*/})));
      //there are other similar API calls.
      //Restangular is supposed to return an API call
  
      promises = Bluebird.mapSeries(promises, function(item, index) {
          return item;     
      });
  
      promises.then(function(){/* the end */});
  }
  </code></pre>
  
  <p>The goal is to process each of the API calls in <code>promises</code> array, but the code above doesn't do this. (i.e. API calls are called almost simultaneously, while each API call is supposed to wait until the previous one is done.)</p>
  
  <p>Do you see anything I'm doing wrong?</p>
  
  <p>Any advice will be appreciated.</p>