Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在C中的Google Drive Api v3中获取根id#_C#_Google Drive Api - Fatal编程技术网

C# 在C中的Google Drive Api v3中获取根id#

C# 在C中的Google Drive Api v3中获取根id#,c#,google-drive-api,C#,Google Drive Api,我正在寻找一种在Google Drive Api v3中查找根文件夹id的方法 在Google Drive Api v2中,有一种直接获取根文件夹ID的方法: string rootFolderID = (ServiceV2.About.Get().Execute()).RootFolderId; 如何在v3中找到根id?这个答案如何 如下所示 您可以在提供文件ID的任何位置使用别名root来引用根文件夹 因此,您可以使用root作为根文件夹ID 注: 如果需要检索实际的根文件夹ID而不是根

我正在寻找一种在Google Drive Api v3中查找根文件夹id的方法

在Google Drive Api v2中,有一种直接获取根文件夹ID的方法:

string rootFolderID = (ServiceV2.About.Get().Execute()).RootFolderId;
如何在v3中找到根id?

这个答案如何

如下所示

您可以在提供文件ID的任何位置使用别名root来引用根文件夹

因此,您可以使用
root
作为根文件夹ID

注:
  • 如果需要检索实际的根文件夹ID而不是
    根文件夹
    ,那么使用files.get方法如何?
    • service.Files.Get(“root”).Execute()
    • 通过此操作,您可以检索实际的根文件夹ID
参考:

如果我误解了你的问题,我道歉。

是的,这就是我要找的。非常感谢@朱利安·多切夫感谢您的回复。我很高兴你的问题得到了解决。塔奈克,你似乎很了解谷歌硬盘sdk。我发布了另一个问题。你能看看你是否能帮我找到解决办法或想法吗。提前谢谢!