我如何获得python Google驱动器API中的fileID或parentID? [英] How can I get fileID or parentID in python Google-drive APIs ??

查看:184
本文介绍了我如何获得python Google驱动器API中的fileID或parentID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如以下示例中的
https://开发人员。 google.com/drive/v2/reference/files/get



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

解决方案

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



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

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


such as from this example below https://developers.google.com/drive/v2/reference/files/get

how/where can i retrieve fileId to use this code? the method require fileId as its parameter ,but I don't know how /where i get it

解决方案

You would use the list() function to find the list of files in the domain, probably specifying the q attribute to search/query for certain files: https://developers.google.com/drive/v2/reference/files/list

the returned files resource has an id parameter you can use to get the individual file and perform updates, sharing, etc.

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

这篇关于我如何获得python Google驱动器API中的fileID或parentID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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