D19368: Fetch Team Drive files and add Drive auth scope

David Barchiesi noreply at phabricator.kde.org
Tue Feb 26 20:24:15 GMT 2019


barchiesi created this revision.
barchiesi added a reviewer: dvratil.
barchiesi added a project: LibKGAPI.
Herald added a project: KDE PIM.
Herald added a subscriber: kde-pim.
barchiesi requested review of this revision.

REVISION 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);

REPOSITORY
  R477 KGAPI Library

REVISION DETAIL
  https://phabricator.kde.org/D19368

AFFECTED FILES
  src/core/account.cpp
  src/core/account.h
  src/drive/filefetchjob.cpp
  src/drive/filefetchjob.h

To: barchiesi, dvratil
Cc: kde-pim, #libkgapi, barchiesi, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190226/619aa741/attachment.html>


More information about the kde-pim mailing list