如何列出与我共享的文件尚未在MyDrive中

时间:2015-04-12 09:00:28

标签: c# .net google-drive-api

当我在我的应用程序中查询MySharedFiles时,响应为空。如何在Mysharedfiles文件夹中搜索?

var service = new DriveService(new BaseClientService.Initializer()
        {
            HttpClientInitializer = credential,
            ApplicationName = "Prototyp Client",
        });
        List<Google.Apis.Drive.v2.Data.File> result = new List<Google.Apis.Drive.v2.Data.File>();
        List<googleFile> resultString = new List<googleFile>();
        FilesResource.ListRequest request = service.Files.List();
        request.Q = "sharedWithMe and trashed=false";

        try
        {
            Google.Apis.Drive.v2.Data.FileList files = request.Execute(); } catch (Exception e)
        {
            Console.WriteLine("An error occurred: " + e.Message);
            request.PageToken = null;
        }

0 个答案:

没有答案