Changeset View
Changeset View
Standalone View
Standalone View
src/drive/driveservice.cpp
Show All 28 Lines | |||||
29 | { | 29 | { | ||
30 | 30 | | |||
31 | namespace Private | 31 | namespace Private | ||
32 | { | 32 | { | ||
33 | static const QUrl GoogleApisUrl(QStringLiteral("https://www.googleapis.com")); | 33 | static const QUrl GoogleApisUrl(QStringLiteral("https://www.googleapis.com")); | ||
34 | static const QString AppsBasePath(QStringLiteral("/drive/v2/about")); | 34 | static const QString AppsBasePath(QStringLiteral("/drive/v2/about")); | ||
35 | static const QString FilesBasePath(QStringLiteral("/drive/v2/files")); | 35 | static const QString FilesBasePath(QStringLiteral("/drive/v2/files")); | ||
36 | static const QString ChangeBasePath(QStringLiteral("/drive/v2/changes")); | 36 | static const QString ChangeBasePath(QStringLiteral("/drive/v2/changes")); | ||
37 | static const QString DrivesBasePath(QStringLiteral("/drive/v2/drives")); | ||||
37 | static const QString TeamdriveBasePath(QStringLiteral("/drive/v2/teamdrives")); | 38 | static const QString TeamdriveBasePath(QStringLiteral("/drive/v2/teamdrives")); | ||
38 | } | 39 | } | ||
39 | 40 | | |||
40 | namespace DriveService | 41 | namespace DriveService | ||
41 | { | 42 | { | ||
42 | 43 | | |||
43 | QUrl fetchAboutUrl(bool includeSubscribed, qlonglong maxChangeIdCount, qlonglong startChangeId) | 44 | QUrl fetchAboutUrl(bool includeSubscribed, qlonglong maxChangeIdCount, qlonglong startChangeId) | ||
44 | { | 45 | { | ||
▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | |||||
282 | 283 | | |||
283 | QUrl modifyRevisionUrl(const QString &fileId, const QString &revisionId) | 284 | QUrl modifyRevisionUrl(const QString &fileId, const QString &revisionId) | ||
284 | { | 285 | { | ||
285 | QUrl url(Private::GoogleApisUrl); | 286 | QUrl url(Private::GoogleApisUrl); | ||
286 | url.setPath(Private::FilesBasePath % QLatin1Char('/') % fileId % QLatin1String("/revisions/") % revisionId); | 287 | url.setPath(Private::FilesBasePath % QLatin1Char('/') % fileId % QLatin1String("/revisions/") % revisionId); | ||
287 | return url; | 288 | return url; | ||
288 | } | 289 | } | ||
289 | 290 | | |||
291 | QUrl fetchDrivesUrl(const QString &drivesId) | ||||
292 | { | ||||
293 | QUrl url(Private::GoogleApisUrl); | ||||
294 | url.setPath(Private::DrivesBasePath % QLatin1Char('/') % drivesId); | ||||
295 | return url; | ||||
296 | } | ||||
297 | | ||||
298 | QUrl hideDrivesUrl(const QString &drivesId, bool hide) | ||||
299 | { | ||||
300 | QUrl url(Private::GoogleApisUrl); | ||||
301 | url.setPath(Private::DrivesBasePath % QLatin1Char('/') % drivesId % (hide ? QLatin1String("/hide") : QLatin1String("/unhide"))); | ||||
302 | return url; | ||||
303 | } | ||||
304 | | ||||
305 | QUrl fetchDrivesUrl() | ||||
306 | { | ||||
307 | QUrl url(Private::GoogleApisUrl); | ||||
308 | url.setPath(Private::DrivesBasePath); | ||||
309 | return url; | ||||
310 | } | ||||
311 | | ||||
290 | QUrl fetchTeamdriveUrl(const QString &teamdriveId) | 312 | QUrl fetchTeamdriveUrl(const QString &teamdriveId) | ||
291 | { | 313 | { | ||
292 | QUrl url(Private::GoogleApisUrl); | 314 | QUrl url(Private::GoogleApisUrl); | ||
293 | url.setPath(Private::TeamdriveBasePath % QLatin1Char('/') % teamdriveId); | 315 | url.setPath(Private::TeamdriveBasePath % QLatin1Char('/') % teamdriveId); | ||
294 | return url; | 316 | return url; | ||
295 | } | 317 | } | ||
296 | 318 | | |||
297 | QUrl fetchTeamdrivesUrl() | 319 | QUrl fetchTeamdrivesUrl() | ||
Show All 10 Lines |