aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp')
-rw-r--r--backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
index 5597d78704..52611126a0 100644
--- a/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
+++ b/backends/cloud/googledrive/googledrivelistdirectorybyidrequest.cpp
@@ -33,6 +33,9 @@
namespace Cloud {
namespace GoogleDrive {
+#define GOOGLEDRIVE_API_FILES "https://www.googleapis.com/drive/v3/files?spaces=drive&fields=files%28id,mimeType,modifiedTime,name,size%29,nextPageToken&orderBy=folder,name"
+//files(id,mimeType,modifiedTime,name,size),nextPageToken
+
GoogleDriveListDirectoryByIdRequest::GoogleDriveListDirectoryByIdRequest(GoogleDriveStorage *storage, Common::String id, Storage::ListDirectoryCallback cb, Networking::ErrorCallback ecb):
Networking::Request(nullptr, ecb), _requestedId(id), _storage(storage), _listDirectoryCallback(cb),
_workingRequest(nullptr), _ignoreCallback(false) {
@@ -57,8 +60,7 @@ void GoogleDriveListDirectoryByIdRequest::start() {
}
void GoogleDriveListDirectoryByIdRequest::makeRequest(Common::String pageToken) {
- Common::String url = "https://www.googleapis.com/drive/v3/files?spaces=drive&fields=files%28id,mimeType,modifiedTime,name,size%29,nextPageToken&orderBy=folder,name";
- //files(id,mimeType,modifiedTime,name,size),nextPageToken
+ Common::String url = GOOGLEDRIVE_API_FILES;
if (pageToken != "")
url += "&pageToken=" + pageToken;
url += "&q=%27" + _requestedId + "%27+in+parents";