gpt4 book ai didi

google-apps-script - 如何下载以前保存的Google Apps脚本修订版?

转载 作者:行者123 更新时间:2023-12-04 21:56:32 24 4
gpt4 key购买 nike

创建脚本副本以将代码 fork 到另一个项目时,我仍在尝试从somehow 'loosing' a Google Apps Script中恢复...我的想法是尝试通过驱动器API下载Google Apps脚本的较旧版本,但this page表示可能这不可能。

Actions such as versioning, publishing or executing the script are not available through the API.



所以我还是尝试了,可惜这个错误发生了。。。
<HttpError 400 when requesting 
https://www.googleapis.com/drive/v2/files/..snipped../revisions?alt=json
returned "File does not support revisions">

因此,没有任何机制可以下载Google Apps脚本的早期版本或“修订”吗?我希望能在script.google.com界面中访问此处显示的“修订版1”:

enter image description here

最佳答案

仅供引用,Apps Script API可以从以前的版本号获取项目文件:
https://developers.google.com/apps-script/api/reference/rest/v1/projects/getContent

如果您想在Apps Script CLI中看到这个,请像clasp pull 3一样扣一下,我确定我可以添加此功能。
https://github.com/google/clasp/
只需提出一个新的问题。

关于google-apps-script - 如何下载以前保存的Google Apps脚本修订版?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33904174/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com