We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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; }); }; `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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;
});
};
`
The text was updated successfully, but these errors were encountered: