[英]Googe drive api - no support for map export (python)
Using the python api client I can export google docs using export
or export_media
and non-google doc material with get_media
. 使用python api客户端,我可以使用export
或export_media
以及带有get_media
非Google doc资料来导出google docs。
Maps saved in the user account are unexportable. 保存在用户帐户中的地图不可导出。 export
returns the error export
返回错误
HttpError: <HttpError 403 ... returned "Export only supports Google Docs.">
I admit it makes no sense to use get_media
but I try anyway given the above error. 我承认使用get_media
没有任何意义,但是鉴于上述错误,我还是尝试了。 It returns: 它返回:
HttpError: <HttpError 403 ... returned "Only files with binary content can be downloaded. Use Export with Google Docs files.">
It seems get_media
and export
disagree about what this object is. 似乎get_media
和export
对于该对象是什么get_media
不同意见。
I suggest that export
should work with mimeType='application/vnd.google-earth.kmz'
我建议export
应与mimeType='application/vnd.google-earth.kmz'
You can use Drive.About.get
to determine the export formats available for each Google MIME type: 您可以使用Drive.About.get
确定每种Google MIME类型可用的导出格式:
GET https://www.googleapis.com/drive/v3/about?fields=exportFormats&key={YOUR_API_KEY}
{
"exportFormats": {
"application/vnd.google-apps.form": [
"application/zip"
],
"application/vnd.google-apps.document": [
"application/rtf",
"application/vnd.oasis.opendocument.text",
"text/html",
"application/pdf",
"application/zip",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"text/plain"
],
"application/vnd.google-apps.drawing": [
"image/svg+xml",
"image/png",
"application/pdf",
"image/jpeg"
],
"application/vnd.google-apps.spreadsheet": [
"text/csv",
"application/x-vnd.oasis.opendocument.spreadsheet",
"application/zip",
"application/pdf",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
],
"application/vnd.google-apps.script": [
"application/vnd.google-apps.script+json"
],
"application/vnd.google-apps.presentation": [
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/pdf",
"text/plain"
]
}
}
As you can see, there are currently no export formats defined for application/vnd.google-apps.map
. 如您所见,目前没有为application/vnd.google-apps.map
定义导出格式。 Given that Google My Maps does support exporting to KMZ/KML, I think ideally the Google Drive API would as well. 鉴于Google我的地图确实支持导出到KMZ / KML,因此我认为Google Drive API也是理想的选择。 You can file a feature request on the issue tracker . 您可以在问题跟踪器上提出功能请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.