简体   繁体   English

如何在Google Drive API v3中获取文件的“lastModified”?

[英]How can I get file's 'lastModified' in Google Drive API v3?

I recently decided to migrate from Drive API v2 to v3. 我最近决定从Drive API v2迁移到v3。

In v2, files().get(fileId) returns almost all attributes, but in v3, it doesn't return the lastModified , which is very essential for me. 在v2中, files().get(fileId)几乎返回所有属性,但在v3中,它不返回lastModified ,这对我来说非常重要。 Is there anyway I can do it in v3? 无论如何我能在v3中做到吗?

In Drive API v3 full resources are no longer returned by default. 在Drive API v3中,默认情况下不再返回完整资源。 Use the fields query parameter to request specific fields to be returned. 使用fields查询参数来请求返回特定字段。 See docs . 查看文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获取 Google Drive 视频的直接链接(Google Drive API v3) - How do I get the direct link for a Google Drive video (Google Drive API v3) 如何使用 Python 将文件插入/上传到 Google Drive API v3 中的特定文件夹 - How can I insert/upload files to a specific folder in Google Drive API v3 using Python 使用 python,我无法从 Google Drive API v3 访问共享驱动器文件夹 - Using python, I can't access shared drive folders from Google Drive API v3 如何使用 Python 和 Drive API v3 从 Google Drive 下载文件 - How to download a file from Google Drive using Python and the Drive API v3 如何使用 Python 和 Drive API v3 将文件上传到 Google Drive - How to upload a file to Google Drive using Python and the Drive API v3 如何使用Google Drive API v3上传到Python中的共享驱动器? - How do I upload to a shared drive in Python with Google Drive API v3? 使用Google Drive API v3获取文件的大小 - Get size of files with Google Drive API v3 Google Drive API v3 更改文件权限并获取可公开共享的链接 (Python) - Google Drive API v3 Change File Permissions and Get Publicly Shareable Link (Python) 通过python的Google Drive api v3文件上传错误 - Google Drive api v3 file upload errors via python Google Drive API v3 更改文件的元数据 - Google Drive API v3 changing metadata of file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM