iopec.blogg.se

Google drive api v3 list files in folder
Google drive api v3 list files in folder











google drive api v3 list files in folder

GetAllFiles(bearerToken,, q, callback,Ĭonsole. 'Authorization': 'Bearer ' + bearerToken,

google drive api v3 list files in folder

Connect: GDrive.ConnectToDrive (Connect, Test the Connection, Refresh the Token, if necessary) -> Call Connected or ConnectFaild (Faild in the Main, can be made better) 3.

google drive api v3 list files in folder

Initialize: GDrive.Initialize (Me, 'Drive', clientId, clientSecret) 2. OnComplete = () => console.log('No onComplete provided'),įields: 'files(id,name,size,mimeType,parents,webViewLink,trashed),nextPageToken', Then the class appended in Post 1 must be imported. I do it recursively, note that I have a callback that collects files - I'm using Redux with React so it just dispatches an action that adds the bunch of files to the state each time the method gets more files: function getAllFiles(bearerToken, pageToken = undefined, q = undefined,Ĭallback = (files) => console.log('No callback provided',













Google drive api v3 list files in folder