【问题标题】:Google Drive Api Client: How to get the list of files in a folderGoogle Drive Api 客户端:如何获取文件夹中的文件列表
【发布时间】:2014-11-29 16:12:35
【问题描述】:

在基于 Python webapp2 的网络应用程序中,我试图以这种方式检索登录用户的谷歌驱动器帐户文件夹中包含的文件列表

 if page_token:
     param['pageToken'] = page_token
 files = service.files().list(**param).setQ("'"+self.requet.get('folder')+"' in parents").execute(http)

我已经按照这个教程https://developers.google.com/drive/v2/reference/files/list

问题是我得到了这个错误:

 'HttpRequest' object has no attribute 'setQ'

【问题讨论】:

    标签: python google-app-engine google-api google-drive-api google-api-client


    【解决方案1】:

    将“q”参数添加到您的参数变量中,而不是使用 .setQ,如下所示:

    param['q'] = "'root' in parents"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多