Fetch Team Drive files and add Drive auth scope

Authored by barchiesi on Feb 27 2019, 9:59 PM.

Description

Fetch Team Drive files and add Drive auth scope

Summary: 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.

Test Plan:
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);

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: kde-pim, LibKGAPI

Tags: KDE PIM, LibKGAPI

Maniphest Tasks: T10521

Differential Revision: https://phabricator.kde.org/D19368

Details

Committed
dvratilFeb 27 2019, 10:01 PM
Reviewer
dvratil
Differential Revision
D19368: Fetch Team Drive files and add Drive auth scope
Parents
R477:4a8d12b53a74: Merge remote-tracking branch 'origin/Applications/18.12'
Branches
Unknown
Tags
Unknown