code: function collectPages(func, callback) {
      var items = [];
      var lastReadId = 0;
      function __collect() {
          return func(lastReadId, function(error, page) {
              if (error) {
                  return callback(error);
              }
              if (!page.length) {
                  return callback(null, items);
              }
              items = items.concat(page);
              lastReadId = page[page.length - 1].id;
              return __collect();
          });
      }
      return __collect();
  }
docs: Helper function for collecting all pages of items.
  
  @param  {Function} func(lastReadId, next) Function invoked to fetch requests
  @param  {Object} callback(error, items) Function invoked once all pages have been fetched