Hi thanks for the project how about to add support to get file details by id
https://www.googleapis.com/drive/v3/files/fileId
something like that:
`/**
var request = {
// spaces: 'drive',
fields:
fields || 'id,kind,name,mimeType,parents,hasThumbnail,webViewLink,folderColorRgb'
};
// If pageToken is set, then request the next page of file list
if (pageToken) {
request.pageToken = pageToken;
}
// If parent folder is set, list files under that folder
if (fileId !== null) {
request.fileId = fileId;
}
return _this.service.files
.getAsync(request)
.then(function (response) {
// debug('Found %s files on folder %s', response.files.length, folderId);
response.fileId = fileId;
return response;
})
.catch(function (err) {
debug('Error listing files ', err.message);
throw err;
});
};
`
Hi thanks for the project how about to add support to get file details by id
https://www.googleapis.com/drive/v3/files/fileId
something like that:
`/**
spesific file
@see https://www.googleapis.com/drive/v3/files/fileId
@see https://developers.google.com/drive/v3/reference/files#resource
@PARAM {string} fileId - id of the file/folder from which to search.
@return {Object<google.drive#file>} Object of file resources results
*/
NodeGoogleDrive.prototype.fileId = function (
fileId,
pageToken,
fields
) {
var _this = this;
var fileId = fileId || _this.options.ROOT_FOLDER
var request = {
// spaces: 'drive',
fields:
fields || 'id,kind,name,mimeType,parents,hasThumbnail,webViewLink,folderColorRgb'
};
// If pageToken is set, then request the next page of file list
if (pageToken) {
request.pageToken = pageToken;
}
// If parent folder is set, list files under that folder
if (fileId !== null) {
request.fileId = fileId;
}
return _this.service.files
.getAsync(request)
.then(function (response) {
// debug('Found %s files on folder %s', response.files.length, folderId);
response.fileId = fileId;
return response;
})
.catch(function (err) {
debug('Error listing files ', err.message);
throw err;
});
};
`