Revisions list and get missing information

心已入冬 提交于 2019-12-02 09:54:32

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.

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());
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!