![]() ![]() System.DebugLog( "- Page " + Str(pageNumber) + " -") PageNumber = 1 Dim pageToken As String Dim bContinueLoop As BooleanīContinueLoop = rest. FullRequestNoBody( "GET", "/drive/v3/files") JsonObject Dim i As Int32 Dim numFiles As Int32 // Send the request for the 1st page. JsonObject Dim jsonFileMetadata As Chilkat. AddQueryParam( "pageSize", "200")ĭim json As New Chilkat. The default page size is 100, with a max of 1000. This master list will also be saved to the cache under the key "AllGoogleDriveFileIds". Dim allFields As StringĪllFields = "appProperties,capabilities,contentHints,createdTime,description,explicitlyTrashed,fileExtension,folderColorRgb,fullFileExtension,headRevisionId,iconLink,id,imageMediaMetadata,isAppAuthorized,kind,lastModifyingUser,md5Checksum,mimeType,modifiedByMeTime,modifiedTime,name,originalFilename,ownedByMe,owners,parents,permissions,properties,quotaBytesUsed,shared,sharedWithMeTime,sharingUser,size,spaces,starred,thumbnailLink,trashed,version,videoMediaMetadata,viewedByMe,viewedByMeTime,viewersCanCop圜ontent,webContentLink,webViewLink,writersCanShare" // We're going to keep a master list of fileId's as we iterate over all the files in this Google Drive account. If no fields are indicated, then only the basic fields are returned. Indicate that we want ALL possible fields. Create a date/time object with an time 7 days from the current date/time. AddRoot "C:/ckCache/googleDrive" // If we are re-building the cache, we can first delete the entire contents of the cache. Level = 0 // Use a root directory that makes sense on your operating system. For large caches (level 2) cache files are located in 256x256 sub-directories two levels down from the root. For medium caches (level 1) cache files are located in 256 sub-directories from the root. For small caches (level 0) all cache files are in the root directory. Indicate the location of the root cache directory, and how many cache levels are to exist. Provide the authentication credentials (i.e. AccessToken = "GOOGLE_DRIVE_ACCESS_TOKEN" Dim rest As New Chilkat. This example uses a previously obtained access token having permission for the // Google Drive scope. See Global Unlock Sample for sample code. Success = True // It requires the Chilkat API to have been previously unlocked. Xojo Plugin for Windows, Linux, Mac OS X, and ARM The cache can be used to fetch information without having to query Google Drive. This example demonstrates how to download the metadata for all files in a Google Drive account to create a local filesystem cache with the information. (Xojo Plugin) Google Drive - Build a Local Cache of Metadata ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |