I don't have prior experience on google drive. I need to get the list of files present in the folder of google drive and get the details of the files.
Example:
Drive
|--Folder
|-File1
|-File2
|--File3
|--File4
I need the details of all the files say File 1,2,3,4. I am able to get the details of File3 and File4 with the below code:
def main():
"""Shows basic usage of the Google Drive API.
Creates a Google Drive API service object and outputs the names and IDs
for up to 10 files.
"""
credentials = get_credentials()
http = credentials.authorize(httplib2.Http())
param['q']="'root' in parents"
service = discovery.build('drive', 'v2', http=http)
results = service.files().list(**param).execute()
page_token = None
items = results.get('items', [])
if not items:
print('No files found.')
else:
print('Files:')
for item in items:
keys = list(item.keys())
print('{0} ,{1} ,{2}, {3}, {4}, {5}, {6}'.format(item['title'],
item['createdDate'],
item['lastModifyingUserName'],
item['modifiedByMeDate'],
item['modifiedDate'],
item['ownerNames'],
item['mimeType']))
From the quickstart guide of google api.
May I know how can I get the details of File1, File2 present in Folder as shown above?