如何在Google Drive API活动查询中设置排序顺序?
我尝试使用查询获取自当前时间减去5分钟以来的所有活动
"filter": "time >= \"2019-12-03T07:37:03Z\" detail.action_detail_case:(MOVE RENAME CREATE DELETE)"
一切都随我需要。
但是此查询的结果是降序排序。
所以我的问题是:在第一个结果元素中,新创建的文件正在使用正确的名称重命名,并且 在第二个结果元素上,新创建的文件的名称为“ 无标题文档”。
我将所有新创建的文件的名称都称为“无标题文档”
如何按时间戳将查询结果按升序排序?
"activities": [
{
"primaryActionDetail": {
"rename": {
"oldTitle": "Untitled document",
"newTitle": "test02"
}
},
"actions": [
{
"detail": {
"rename": {
"oldTitle": "Untitled document",
"newTitle": "test02"
}
}
},
],
"targets": [
{
"driveItem": {
"name": "items/1IHGEyGGn7UfD4fnP9hg6FZ7aGNzx2f-7CvJ5FoH1vBc",
"title": "test02",
"file": {},
"mimeType": "application/vnd.google-apps.document",
"owner": {
"user": {
"knownUser": {
"personName": "people/107838802601352820081",
"isCurrentUser": true
}
}
},
"driveFile": {}
}
}
],
"timestamp": "2019-12-03T07:20:40.622Z"
},
{
"primaryActionDetail": {
"create": {
"new": {}
}
},
"actions": [
{
"detail": {
"create": {
"new": {}
}
}
}
],
"targets": [
{
"driveItem": {
"name": "items/1IHGEyGGn7UfD4fnP9hg6FZ7aGNzx2f-7CvJ5FoH1vBc",
"title": "Untitled document",
"file": {},
"mimeType": "application/vnd.google-apps.document",
"owner": {
"user": {
"knownUser": {
"personName": "people/107838802601352820081",
"isCurrentUser": true
}
}
},
"driveFile": {}
}
}
],
"timestamp": "2019-12-03T07:20:39.615Z"
}
]