如何在Google Drive API v3中获取文件的“lastModified”? [英] How can I get file's 'lastModified' in Google Drive API v3?

查看:93
本文介绍了如何在Google Drive API v3中获取文件的“lastModified”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在v2中, files()。get(fileId) c $ c>几乎返回所有属性,但在v3中,它不会返回 lastModified ,这对我来说非常重要。有什么方法可以在v3中完成?

解决方案

在Drive API v3中,默认情况下不会再返回完整资源。使用字段查询参数来请求返回特定的字段。请参阅文档


I recently decided to migrate from Drive API v2 to 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. Is there anyway I can do it in v3?

解决方案

In Drive API v3 full resources are no longer returned by default. Use the fields query parameter to request specific fields to be returned. See docs.

这篇关于如何在Google Drive API v3中获取文件的“lastModified”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆