src/dropbox.js
function () {
    var url = 'https://api.dropboxapi.com/2/users/get_current_account';

    return this._request('POST', url, {}).then(function (response) {
      var info = response.responseText;

      try {
        info = JSON.parse(info);
      } catch (e) {
        return Promise.reject(new Error('Could not query current account info: Invalid API response: ' + info));
      }

      return Promise.resolve({
        email: info.email
      });
    });
  }
function () {
    var url = 'https://api.dropboxapi.com/2/users/get_current_account';

    return this._request('POST', url, {}).then(function (response) {
      var info = response.responseText;

      try {
        info = JSON.parse(info);
      } catch (e) {
        return Promise.reject(new Error('Could not query current account info: Invalid API response: ' + info));
      }

      return Promise.resolve({
        email: info.email
      });
    });
  }
Fetches the user's info from dropbox and returns a promise for it.

@return {Promise} a promise for user info object (email - the user's email address)

@protected