如何在python Google-drive API中获取fileID或parentID?

时间:2012-11-26 15:50:28

标签: python-2.7 google-drive-api

例如来自下面的这个例子 https://developers.google.com/drive/v2/reference/files/get

我如何/在哪里可以检索fileId以使用此代码?该方法需要fileId作为其参数,但我不知道如何/在哪里得到它

1 个答案:

答案 0 :(得分:1)

您可以使用list()函数查找域中的文件列表,可能指定q属性来搜索/查询某些文件: https://developers.google.com/drive/v2/reference/files/list

返回的文件资源有一个id参数,可用于获取单个文件并执行更新,共享等。

https://developers.google.com/drive/v2/reference/files#resource