This patch allows fetching files that are children of some Team Drive id, as in the example below. The other change is the insertion of the Drive scope usable during authentication.
Details
Details
- Reviewers
dvratil - Maniphest Tasks
- T10521: [Drive] Implement Team Drives portion of the API
- Commits
- R477:ed60b82afdf2: Fetch Team Drive files and add Drive auth scope
And example of Team Drive file listing:
KGAPI2::Drive::FileSearchQuery query; query.addQuery(KGAPI2::Drive::FileSearchQuery::Trashed, KGAPI2::Drive::FileSearchQuery::Equals, false); query.addQuery(KGAPI2::Drive::FileSearchQuery::Parents, KGAPI2::Drive::FileSearchQuery::In, "someTeamDriveId"); KGAPI2::Drive::FileFetchJob *fileFetchJob = new KGAPI2::Drive::FileFetchJob(query, m_account, nullptr); fileFetchJob->setIncludeTeamDrive(true); fileFetchJob->setFields((KGAPI2::Drive::FileFetchJob::BasicFields & ~KGAPI2::Drive::FileFetchJob::Permissions) | KGAPI2::Drive::FileFetchJob::Labels | KGAPI2::Drive::FileFetchJob::ExportLinks | KGAPI2::Drive::FileFetchJob::LastViewedByMeDate);
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Please add a getter for includeTeamDriveItems() as well.
src/drive/filefetchjob.h | ||
---|---|---|
123 | const not needed here. |