Google Drive API未显示所有修订



我有一个谷歌工作表,用来跟踪项目。它在第一页上有一个表,上面有很多项目状态的东西,我想写一个程序来获得每个修订的表,并显示事情是如何变化的。实现这一点的方法应该是Google Drive API的这种方法。我做了一个简单的versions = self.drive.revisions().list(fileId=document_id).execute(),起初似乎有效,但只有可以追溯到2023-03-25年的版本,同时通过docs.google.com查看版本历史,显示了可以追溯到去年的版本。我数了数我从那行代码中看到了多少,得到了78个修订。事实上,这是完整的输出。

{
"kind": "drive#revisionList",
"revisions": [
{
"id": "43965",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-25T04:05:30.207Z"
},
{
"id": "43995",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-25T19:41:57.778Z"
},
{
"id": "44001",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-25T20:46:32.836Z"
},
{
"id": "44003",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-25T23:35:26.866Z"
},
{
"id": "44016",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-26T01:13:46.495Z"
},
{
"id": "44022",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-26T03:53:14.166Z"
},
{
"id": "44046",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-26T05:00:20.680Z"
},
{
"id": "44053",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-26T18:24:55.648Z"
},
{
"id": "44059",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-26T20:41:01.992Z"
},
{
"id": "44060",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T05:05:01.388Z"
},
{
"id": "44090",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T08:47:04.164Z"
},
{
"id": "44104",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T15:33:17.366Z"
},
{
"id": "44112",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T19:18:54.392Z"
},
{
"id": "44116",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T20:27:10.369Z"
},
{
"id": "44119",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-27T22:04:14.144Z"
},
{
"id": "44131",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T00:36:44.902Z"
},
{
"id": "44161",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T05:28:48.960Z"
},
{
"id": "44180",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T15:22:06.105Z"
},
{
"id": "44196",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T17:17:20.094Z"
},
{
"id": "44198",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T18:41:19.696Z"
},
{
"id": "44200",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T19:48:34.181Z"
},
{
"id": "44202",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T20:33:35.024Z"
},
{
"id": "44211",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T21:53:54.675Z"
},
{
"id": "44220",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-28T23:55:24.729Z"
},
{
"id": "44248",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-29T05:02:39.648Z"
},
{
"id": "44291",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-29T15:31:04.617Z"
},
{
"id": "44298",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-29T18:33:24.005Z"
},
{
"id": "44317",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-30T17:59:07.158Z"
},
{
"id": "44357",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-30T19:36:08.531Z"
},
{
"id": "44363",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-30T20:31:52.080Z"
},
{
"id": "44369",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-31T03:10:20.864Z"
},
{
"id": "44400",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-31T06:44:00.598Z"
},
{
"id": "44407",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-31T17:07:06.371Z"
},
{
"id": "44432",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-03-31T19:23:29.108Z"
},
{
"id": "44457",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T10:02:35.601Z"
},
{
"id": "44459",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T12:50:52.237Z"
},
{
"id": "44469",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T15:57:27.930Z"
},
{
"id": "44477",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T16:41:27.471Z"
},
{
"id": "44487",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T18:00:38.356Z"
},
{
"id": "44494",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T22:20:56.778Z"
},
{
"id": "44520",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-01T23:57:37.239Z"
},
{
"id": "44533",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T01:05:43.422Z"
},
{
"id": "44555",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T02:31:42.116Z"
},
{
"id": "44602",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T04:06:10.102Z"
},
{
"id": "44613",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T14:20:36.278Z"
},
{
"id": "44617",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T14:52:09.802Z"
},
{
"id": "44661",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T16:37:41.966Z"
},
{
"id": "44671",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-02T18:04:39.310Z"
},
{
"id": "44677",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T03:02:32.600Z"
},
{
"id": "44707",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T04:12:13.984Z"
},
{
"id": "44754",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T05:29:27.675Z"
},
{
"id": "44760",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T06:42:45.964Z"
},
{
"id": "44781",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T16:03:11.685Z"
},
{
"id": "44785",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T18:09:33.417Z"
},
{
"id": "44789",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T18:51:08.286Z"
},
{
"id": "44793",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T20:31:42.634Z"
},
{
"id": "44797",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-03T21:33:15.528Z"
},
{
"id": "44809",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T01:41:33.395Z"
},
{
"id": "44816",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T03:17:24.988Z"
},
{
"id": "44854",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T03:59:19.549Z"
},
{
"id": "44873",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T06:08:36.895Z"
},
{
"id": "44890",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T08:34:15.162Z"
},
{
"id": "44934",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T17:41:27.133Z"
},
{
"id": "44948",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T18:31:12.263Z"
},
{
"id": "44979",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T19:41:40.078Z"
},
{
"id": "44981",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T20:38:27.040Z"
},
{
"id": "44987",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T21:22:10.843Z"
},
{
"id": "44989",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-04T22:35:15.787Z"
},
{
"id": "44991",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T01:42:06.510Z"
},
{
"id": "45001",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T03:23:40.312Z"
},
{
"id": "45110",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T06:10:13.567Z"
},
{
"id": "45128",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T15:00:26.732Z"
},
{
"id": "45142",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T15:59:47.505Z"
},
{
"id": "45155",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T16:44:13.218Z"
},
{
"id": "45184",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T18:38:09.832Z"
},
{
"id": "45191",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T19:22:16.895Z"
},
{
"id": "45201",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T20:47:59.776Z"
},
{
"id": "45205",
"mimeType": "application/vnd.google-apps.spreadsheet",
"kind": "drive#revision",
"modifiedTime": "2023-04-05T22:16:58.745Z"
}
]
}

API文件表示,如果有太多的修订,它将使用nextPageToken进行响应,该CCD_2可用于获得多余的修订,但该响应不包含其中之一。我应该使用其他方法吗?

我知道您需要有关使用Drive API对Google Sheets进行修订的信息。

修订历史记录存储了对图纸所做的许多历史操作和编辑。此数字随命令复杂性、每个命令中涉及的数据量以及所做编辑的频率而变化。

虽然修订历史记录足够大,可以覆盖文件中的大多数修订,但不能保证所有修订历史记录的可用性。对工作表所做的更改,如经常恢复到旧版本,将减少可用的历史修订数量非常大且经常更改的表格也往往具有较短的修订历史

如本文所述:

修订历史

按时间顺序记录文件的所有修订。改变文档、工作表或幻灯片文件将获得新的修订。每次内容更改,驱动器为其创建一个新的修订历史记录条目文件但是,这些编辑器文件修订版可能会合并在一起,因此3。

这反过来解释了关于nextPageToken属性的参考链接中的描述:

nextPageToken

修订的下一页的页面标记如果已到达修订列表的末尾。如果令牌是由于任何原因被拒绝,它应该被丢弃,并且分页从结果的第一页重新启动。

相关内容

  • 没有找到相关文章

最新更新