add tests to insight storage + remove used code

This commit is contained in:
Matias Alejo Garcia 2014-12-03 08:23:53 -03:00
commit bd698257f9
6 changed files with 124 additions and 93 deletions

View file

@ -298,32 +298,4 @@ GoogleDrive.prototype._checkHomeDir = function(cb) {
});
};
GoogleDrive.prototype.allKeys = function(cb) {
var self = this;
this._checkHomeDir(function(homeId) {
preconditions.checkState(homeId);
var request = gapi.client.request({
'path': '/drive/v2/files',
'method': 'GET',
'params': {
'q': "'" + homeId + "' in parents and trashed = false",
'fields': 'items(id,title)'
},
});
request.execute(function(res) {
// console.log('[googleDrive.js.152:res:]', res); //TODO
if (res.error)
throw new Error(res.error.message);
var ret = [];
for (var ii in res.items) {
ret.push(res.items[ii].title);
}
return cb(ret);
});
});
};
module.exports = GoogleDrive;