简体   繁体   English

通过 Google 文档 API Python 客户端库创建新的 Google 文档的命令是什么?

[英]What are the commands for creating a new Google Document via the Google Docs API Python Client Library?

I would like to create a new Google Document from the command line using the Google Docs API Python Client Library ( https://github.com/googleapis/google-api-python-client ).我想使用 Google Docs API Python 客户端库 ( https://github.com/googleapis/google-api-client ) 从命令行创建一个新的 Google 文档

What are the commands for creating a new document?创建新文档的命令是什么?

Sample:样本:

body = {
    'title': 'myTitle'
}
doc = service.documents().create(body=body).execute()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM