修订列表并获取缺少的信息 [英] Revisions list and get missing information
问题描述
使用Google API浏览器以及Google Drive API官方C#库 v3 ,响应中缺少大部分记录的字段。我特别需要访问谁做了修订,可以通过 $。lastModifyingUser
。
访问在我的域管理员帐户以及服务帐户上尝试了这一点,所以它不应该是一个权限问题,至少不是我能看到的。我做错了什么,如果有的话?
列表:
{
kind:drive#revisionList ,
修订:[
{
kind:drive#revision,
id:1,
mimeType: application / vnd.google-apps.spreadsheet,
modifiedTime:2016-11-16T18:29:29.527Z
},
{
kind: drive#revision,
id:14,
mimeType:application / vnd.google-apps.spreadsheet,
modifiedTime:2016-11-11 -16T18:35:49.184Z
,
...
单一获取:
{
$ p $您需要添加
kind:drive#revision,
id:134088,
mimeType:application /vnd.google-apps.spreadsheet,
modifiedTime:2017-05-24T11:48:00.788Z
}
fields =*
或<$ c> $ c> fields =permissions(id,lastModifyingUser),以指示Drive返回完整资源。默认情况下,只返回一小部分属性。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 need access to who did the revisions, which should be accessible via
$.lastModifyingUser
.I've tried this on my domain admin account as well as a service account, so it shouldn't be a permission issue, at least not that I can see. What am I doing wrong, if anything?
List:
{ "kind": "drive#revisionList", "revisions": [ { "kind": "drive#revision", "id": "1", "mimeType": "application/vnd.google-apps.spreadsheet", "modifiedTime": "2016-11-16T18:29:29.527Z" }, { "kind": "drive#revision", "id": "14", "mimeType": "application/vnd.google-apps.spreadsheet", "modifiedTime": "2016-11-16T18:35:49.184Z" }, ...
{ "kind": "drive#revision", "id": "134088", "mimeType": "application/vnd.google-apps.spreadsheet", "modifiedTime": "2017-05-24T11:48:00.788Z" }
解决方案You need to add
fields="*"
, orfields="permissions(id,lastModifyingUser)"
to your request to instruct Drive to return the full resource. By default, only a minimal set of properties is returned.这篇关于修订列表并获取缺少的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!