Revisions list and get missing information

后端 未结 2 1633
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-27 12:24

Using the Google APIs Explorer as well as the official C# library for Google Drive API v3, the response is missing most of the documented fields. I specifically

相关标签:
2条回答
  • 2021-01-27 12:40

    I was not able to retrieve the "lastModifyingUser" from the revisions API but I was able to retrieve the "lastModifyingUser" from the Files.get fro example:

        File foundFile = service.files().get(id)
                .setSupportsTeamDrives(true)
                .setFields("parents, webViewLink, properties, lastModifyingUser")
                .execute();
    
        System.out.println("Found file is " + foundFile);
        System.out.println("Parents " + foundFile.getParents());
        System.out.println("Owners " + foundFile.getOwners());
        System.out.println("Props " + foundFile.getProperties());
        System.out.println("Last user " + foundFile.getLastModifyingUser());
    
    0 讨论(0)
  • 2021-01-27 12:49

    You need to add fields="*", or fields="permissions(id,lastModifyingUser)" to your request to instruct Drive to return the full resource. By default, only a minimal set of properties is returned.

    0 讨论(0)
提交回复
热议问题