Skip to content

Instantly share code, notes, and snippets.

@tanaikech
Last active January 28, 2018 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tanaikech/242f644026837dd071f0ce95b2fd107a to your computer and use it in GitHub Desktop.
Save tanaikech/242f644026837dd071f0ce95b2fd107a to your computer and use it in GitHub Desktop.
Which of Drive API v2 or v3 is used for DriveApp.searchFiles()?

Which of Drive API v2 or v3 is used for DriveApp.searchFiles()?

Experiment

It has investigated the differences between the documents of "Search for Files" for v2 and v3. The following table shows the comparison of v2 and v3 for "Valid fields for files.list". The column of DriveApp.searchFiles() means whether the query can be used for DriveApp.searchFiles().

v2 v3 Difference DriveApp.searchFiles()
title name different v2: succeed, v3: fail
fullText fullText same
mimeType mimeType same
modifiedDate modifiedTime same
lastViewedByMeDate viewedByMeTime different v2: succeed, v3: fail
trashed trashed same
starred starred same
parents parents same
owners owners same
writers writers same
readers readers same
sharedWithMe sharedWithMe same
properties properties same
properties with visibility='PRIVATE' appProperties different v2: succeed, v3: fail
visibility visibility same

Result

As the result, it is considered that DriveApp.searchFiles() is used as Drive API v2 yet.

References :

January 5th, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment