Created
February 11, 2020 13:19
-
-
Save BinnyChanchal/161d3c5b9cb44187a2a174aecf0b86d1 to your computer and use it in GitHub Desktop.
List files on Google Shared Drive(Team Drive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gettigAllTeamDrivesWithId(){ | |
let drives = Drive.Drives.list(); | |
return drives; | |
} | |
function gettingAllFilesOfTeamDrive(teamDriveId){ | |
var query = 'mimeType = "application/vnd.google-apps.folder" and trashed=false '; | |
var param = { | |
corpora:'teamDrive', | |
includeTeamDriveItems:true, | |
supportsTeamDrives:true, | |
teamDriveId:teamDriveId, | |
q:query | |
} | |
var folders = Drive.Files.list(param); | |
return folders.items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment