【问题标题】:Filter by multiple resourceId's按多个resourceId过滤
【发布时间】:2012-08-20 10:58:29
【问题描述】:

有没有办法使用 .Net 库通过多个 resourceId 进行查询?

例如,通常我通过resourceId 查询单个提要条目,如下所示:

DocumentsListQuery query = new DocumentsListQuery();
query.Uri = new Uri(string.Format("{0}/{1}", DocumentsListQuery.documentsBaseUri, doc.ResourceId));
DocumentsFeed feed = service.Query(query);

我想知道是否有某种方法可以在单个查询中通过 resourceId 查询多个文档,而不是只获取整个列表。

【问题讨论】:

    标签: google-docs-api google-drive-api


    【解决方案1】:

    单个 RESTful 查询只能返回单个元素或提要,因此无法通过多个 resourceId 进行查询。

    另一种方法可能是指定一个搜索查询,将您的结果限制为您想要的元素,但只有当您的文件具有将它们与其他文档区分开来的共同点时,这样的搜索条件才存在。

    文档列表 API 中的搜索查询文档位于 https://developers.google.com/google-apps/documents-list/#searching_for_documents_and_files,但我也建议您查看较新的 Drive API 以及它如何管理搜索:

    https://developers.google.com/google-apps/documents-list/#searching_for_documents_and_files

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-05
      • 2022-11-02
      • 2013-10-20
      • 2021-10-20
      • 2019-12-21
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      相关资源
      最近更新 更多