【问题标题】:Google Drive List API - not listed all the documents?Google Drive List API - 没有列出所有文件?
【发布时间】:2014-02-05 03:35:25
【问题描述】:

我正在尝试使用 Google Drive List API 列出所有文档。但它没有列出所有文档,一些文档详细信息未在响应中显示。

此问题出现在我们客户的某些云端硬盘帐户中。在 OAuth2 Playground 中尝试时,它会产生相同的响应,但这些用户缺少文档列表。

注意:我使用的范围https://www.googleapis.com/auth/drive

文件 mimetype 是“application/vnd.google-apps.spreadsheet”

谁能帮我找出原因?

【问题讨论】:

  • 你能发布一些你的代码吗?
  • 不仅在我的代码中。我在 OAuth2 操场上试过,也只有相同的响应(列出了一些文件)
  • 要么被丢弃,要么 mimetype 有问题。
  • 不,文件不会被丢弃。我已经交叉验证了。
  • 即使页面为空,您是否关注所有下一页标记?我敢打赌这就是问题所在。

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


【解决方案1】:

结果列表可能限制为 100 项。你可能想检查一下! 可以选择增加此限制:

            DocumentsListQuery dlq = new DocumentsListQuery(DocumentsListQuery.documentsBaseUri) 
            { 
                NumberToRetrieve = 100000,
                ShowFolders = true,
                Trashed = false
            };

【讨论】:

    猜你喜欢
    • 2021-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-22
    • 1970-01-01
    • 2014-12-31
    • 1970-01-01
    相关资源
    最近更新 更多