久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

設置“發(fā)布到網絡"在 Google 電子表格中使用

Set quot;publish to webquot; in Google spreadsheet using Drive python API(設置“發(fā)布到網絡在 Google 電子表格中使用 Drive python API)
本文介紹了設置“發(fā)布到網絡"在 Google 電子表格中使用 Drive python API的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試使用 Python 版本的 Google Drive API 在 Google 文檔中模擬單擊發(fā)布到網絡"->立即開始發(fā)布".根據我對文檔的模糊理解,我相信這應該可行:

I'm trying to simulate clicking "publish to web" -> "start publishing now" in Google docs using the Python version of the Google Drive API. Based on my vague understanding of the documentation, I believe this should work:

service.revisions().update(fileId = newfile['id'],
    revisionId='head', body={'published':True, 'publishAuto': True})

但是,這似乎對我的文檔沒有影響.

However, this appears to have no effect on my document.

我希望能夠以編程方式創(chuàng)建一個可供全世界立即訪問的 Google 電子表格.

I'd like to be able to programmatically create a Google spreadsheet that is immediately world-accessible.

推薦答案

原來上面代碼片段返回的響應對象需要調用execute():

Turns out the response object that's returned by the code snippet above needs to call execute():

service.revisions().update(fileId = newfile['id'], revisionId='head',
    body={'published':True, 'publishAuto': True}).execute()

這會返回一個修訂對象并設置文檔的發(fā)布屬性.

This returns a revision object and sets the publish properties on the document.

這篇關于設置“發(fā)布到網絡"在 Google 電子表格中使用 Drive python API的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時出現問題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節(jié)點)
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應并將元素值存儲在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對象)
主站蜘蛛池模板: 亚洲欧洲小视频 | 日韩最新网址 | 99精品欧美一区二区三区 | 亚洲精品99 | 亚洲一页 | av片网站| 中文精品一区二区 | 亚洲一区二区三区免费视频 | 黄视频免费| 久久久精品一区二区三区 | 天啪| 性色的免费视频 | 夜夜爽99久久国产综合精品女不卡 | 久草视频在线播放 | 欧美日韩一区二区在线观看 | 国产精品久久久久久久岛一牛影视 | 亚洲第一免费播放区 | 国产在线成人 | 成人h电影在线观看 | 波波电影院一区二区三区 | 亚洲欧美视频 | 久久久国产精品一区 | 老司机67194精品线观看 | 国产一区二区三区 | 中文在线一区二区 | 手机在线一区二区三区 | 欧美一级全黄 | 精品视频在线观看 | 91大神在线看 | 亚洲一区二区三区免费视频 | 国产一区亚洲 | 91精品国产色综合久久不卡98 | 欧美成人精品激情在线观看 | 国产日韩精品在线 | 日本成人二区 | 欧美激情啪啪 | 精精国产xxxx视频在线播放7 | 在线视频a | 草草草久久久 | 亚洲精彩视频在线观看 | www.亚洲精品 |