问题描述
使用'q'参数搜索文件夹,我得到了一个我没有想到的模糊匹配结果。在以下情况下,我正在搜索“#731#”,并且返回的结果是“#7311#”。由于后一个字符串实际上并不包含前一个字符串,所以我没想到会有该结果。
仅供参考,这实际上是Zapier进行的呼叫-它使用的是v2,因此我没有选择移至v3的选项。
--------------------------------------------------------------------------------
REQUEST
--------------------------------------------------------------------------------
GET https://www.googleapis.com/drive/v2/files?maxResults=5&q=title+contains+%27%23731%23%27+and+trashed+%3D+false+and+mimeType+%3D+%27application%2Fvnd.google-apps.folder%27+and+%271oSVTT56an_b9j_2v36YYL0RttSTMxacT%27+in+parents&supportsAllDrives=true&includeTeamDriveItems=true
--------------------------------------------------------------------------------
RESPONSE
--------------------------------------------------------------------------------
200
Expires: Sun,09 Aug 2020 23:07:40 GMT
Date: Sun,09 Aug 2020 23:07:40 GMT
Cache-Control: private,max-age=0,must-revalidate,no-transform
Etag: "qE31rY2igMHAxggaw96n3Xtt01o"
vary: Origin,X-Origin
Content-Type: application/json; charset=UTF-8
content-encoding: gzip
X-Content-Type-Options: nosniff
x-frame-options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-Xss-Protection: 1; mode=block
Server: GSE
Alt-Svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
transfer-encoding: chunked
{
"kind": "drive#fileList","etag": "\"qE31rY2igMHAxggaw96n3Xtt01o\"","selfLink": "https://www.googleapis.com/drive/v2/files?includeTeamDriveItems=true&maxResults=5&q=title+contains+'%23731%23'+and+trashed+%3D+false+and+mimeType+%3D+'application/vnd.google-apps.folder'+and+'1oSVTT56an_b9j_2v36YYL0RttSTMxacT'+in+parents&supportsAllDrives=true","incompleteSearch": false,"items": [{
"kind": "drive#file","id": "12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C","etag": "\"MTU5NjgxODAxMjYyMA\"","selfLink": "https://www.googleapis.com/drive/v2/files/12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C","alternateLink": "https://drive.google.com/drive/folders/12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C","embedLink": "https://drive.google.com/embeddedfolderview?id=12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C","iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder+shared","title": "#7311#","mimeType": "application/vnd.google-apps.folder","labels": {
"starred": false,"hidden": false,"trashed": false,"restricted": false,"viewed": true
},"copyRequiresWriterPermission": false,"createdDate": "2020-08-06T12:48:53.426Z","modifiedDate": "2020-08-07T16:33:32.620Z","modifiedByMeDate": "2020-08-06T12:48:53.426Z","lastViewedByMeDate": "2020-08-06T12:48:53.426Z","markedViewedByMeDate": "1970-01-01T00:00:00.000Z","version": "4","parents": [{
"kind": "drive#parentReference","id": "1oSVTT56an_b9j_2v36YYL0RttSTMxacT","selfLink": "https://www.googleapis.com/drive/v2/files/12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C/parents/1oSVTT56an_b9j_2v36YYL0RttSTMxacT","parentLink": "https://www.googleapis.com/drive/v2/files/1oSVTT56an_b9j_2v36YYL0RttSTMxacT","isRoot": false
}],"userPermission": {
"kind": "drive#permission","etag": "\"48mYxyd7lvXVcFbAGXpkTSzlUPg\"","id": "me","selfLink": "https://www.googleapis.com/drive/v2/files/12xY5YicH_xwEffZ3hKWSB-VRJXGKdr_C/permissions/me","role": "owner","type": "user"
},"quotaBytesUsed": "0","ownerNames": [
"Eric Alderman"
],"owners": [{
"kind": "drive#user","displayName": "Eric Alderman","picture": {
"url": "https://lh3.googleusercontent.com/a-/AOh14Gghb1AL4-QjAAp-0vkuLC6mVKen47uaGk326jyWMw=s64"
},"isAuthenticatedUser": true,"permissionId": "18353875801874345244","emailAddress": "[email protected]"
}],"lastModifyingUserName": "Eric Alderman","lastModifyingUser": {
"kind": "drive#user","isAuthenticatedUser": false,"permissionId": "01686054877458754075","emailAddress": "[email protected]"
},"capabilities": {
"cancopy": false,"canEdit": true
},"editable": true,"copyable": false,"writersCanShare": true,"shared": true,"explicitlyTrashed": false,"appDataContents": false,"spaces": [
"drive"
]
}]
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)