The supportsTeamDrives flags where not getting applied to a FileFetchJob with a specific file to fetch. This patch fixes the bug and adds the query parameter to all Jobs that allow it.
Details
Diff Detail
- Repository
- R477 KGAPI Library
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
According to https://developers.google.com/drive/api/v3/reference/files/get the supportsTeamDrives parameter is deprecated and should not be used. We should be setting supportsAllDrives and includeItemsFromAllDrives and we should be setting them to true unconditionally since we now support Team Drives - in 2020 GDrive will start ignoring those parameters and will always list contents from Team drives, too, so effectively setting them to false in KGAPI would look like a bug.
It seems like Google updated the v2 and v3 Drive references. The Teamdrive part of the API that I recently added is now considered deprecated and Drives should be used instead. Sintactically they are very similar, if not same apart from the added features.
The deprecation notice you are referring to was also just recently added, while the default value if unspecified remains false (?!). So we need to unconditionally set all 4 to true (includeTeamDriveItems, includeItemsFromAllDrives, supportsTeamDrives, supportsAllDrives), at least until June 1, 2020 when I presume the default will be changed to true.
supportsTeamDrives documentation says "Use supportsAllDrives instead, for includeTeamDriveItems to use includeItemsFromAllDrives, so I think we don't have to set all four of them, only the "allDrives" versions, they all have the same effect. In this case 1:1 mapping with the REST API is not necessary, IMO
src/drive/filefetchjob.h | ||
---|---|---|
137 | Deprecate all the getters as well, please. | |
166 | Let's not introduce getters/setters that only alias other functions. |