Google Drive:属性[]列表在文件资源中不存在? [英] Google Drive: properties[] list not present in Files resource?

查看:131
本文介绍了Google Drive:属性[]列表在文件资源中不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Drive SDK文档表示Files资源的 properties [] >其属性资源列表。但是,当我们实际执行files.list或files.get查询时,文件资源中不会返回这样的列表。我们能够获取Properties资源的唯一方法是直接为每个文件查询它们(通过properties.list)一次,这是性能损失,因为单个files.list操作可以返回许多文件。我们的应用程序将为每个文件存储自定义元数据,并且需要能够及时检索它。



文档是否出错?如果是这样,这个功能是否会很快出现?如果文档是正确的,我们如何才能在文件资源中填充属性[] ?我在发布之前搜索了这个答案,但我看到的只有你可以' t过滤搜索查询属性。感谢您的帮助!编辑:我们可以使用文件 .update / patch将数据插入属性[]中,但该数据似乎只能通过属性 .get / list检索。我们希望能够在文件 .get / list中获取这些数据,正如文档所暗示的那样,但这不起作用。从Files API的角度来看, properties [] 似乎是只写的。

解决方案

这是一个文档问题,您只能通过 properties.list / get 来检索属性。基于属性和人口属性的查询字段计划在文件资源中,但目前它们都不受支持。


The Google Drive SDK documentation says that a Files resource has a properties[] list of its Properties resources. When we actually perform files.list or files.get queries, however, no such list is returned in the Files resources. The only way we've been able to get Properties resources is to query for them directly (via properties.list) once for each file, which is a performance drain since a single files.list operation can return many files. Our application will store custom metadata with each file and needs to be able to retrieve it in a timely manner.

Is the documentation in error? If so, is this functionality going to appear anytime soon? If the documentation is correct, how can we get properties[] to be populated in Files resources? I searched for answers to this before posting, but all I see is that you can't filter search queries for properties. Thanks for your help!

EDIT: We can use files.update/patch to insert data into properties[], but that data only seems to be retrievable via properties.get/list. We expect to be able to get this data in files.get/list, as implied by the documentation, but this is not working. From the point of view of the Files API, properties[] seems to be write-only.

解决方案

It's a documentation problem, you can retrieve properties only by properties.list/get. Querying based on properties and population of properties field were planned for files resource but none of them are supported at the moment.

这篇关于Google Drive:属性[]列表在文件资源中不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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