I tried to use googleapi.drive('v3').files.get, and in the response.files list, each object only contains four fields: name, id, kind and mime_type.
However, the API should return a lot more than those. (e.g. the url and owner)
Thanks!
fyi: https://developers.google.com/drive/v2/reference/files/get
/cc @erickoledadevrel
It's not clearly documented, but this is working as intended. You need to explicitly set the fields parameter and list the names of the fields you want returned.
FYI @sqrrrl.
For anyone looking here who wants to see all fields for testing you can send in '*' for the fields param to get all fields back.
For anyone looking here who wants to see all fields for testing you can send in
'*'for the fields param to get all fields back.
To anyone using API V3 this is still valid.
example:
getfile = service.files().get(fileId='FILE ID', supportsAllDrives=True, acknowledgeAbuse=None, fields='*').execute()
Since the syntax on how to specify just the desired fields was not clear to me following the documentation I leave here an example. Just create a string and separate them by commas:
let request = gapi.client.drive.files.get({ fileId: 'FILE ID', fields: 'name, trashed' });
Most helpful comment
For anyone looking here who wants to see all fields for testing you can send in
'*'for the fields param to get all fields back.