如何自动将Chrome扩展程序发布到Web商店? [英] How to automate publishing Chrome extension to the Web store?

查看:137
本文介绍了如何自动将Chrome扩展程序发布到Web商店?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Google Chrome 21.x私人更新网站开始,将不再受支持。这迫使我们将我们的扩展移至Google网上商店。以前,我们使用自动脚本创建.crx文件,对其进行签名并上载到更新站点。是否有一种方法可以将脚本上传到Google Web商店?



谢谢!

解决方案

自2014年3月起

a>,有一个API来做到这一点。文档此处



我从不因此我无法提供完整的示例。



但是,从文档中,基本流程将是经过身份验证的具有更新软件包的请求,然后通过身份验证发布请求
$ b

 > ; curl \ 
-HAuthorization:Bearer $ TOKEN\
-Hx-goog-api-version:2\
-X PUT \
-T $ FILE_NAME \
-v \
https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID

> curl \
-HAuthorization:Bearer $ TOKEN\
-Hx-goog-api-version:2\
-HContent-Length:0 \
-X POST \
-v \
https://www.googleapis.com/chromewebstore/v1.1/items/$APP_ID/publish


Starting from Google Chrome 21.x private update sites won't be supported anymore. This forces us to move our extension to the Google Web store. Previously, we used an automatic script that created .crx file, signed it, and uploaded to the update site. Is there a way to do script uploading extension to the Google Web store?

Thanks!

解决方案

Since March 2014, there is an API to do that. Documentation here.

I never worked with it, so I cannot provide a full example.

However, from the documentation, the basic flow would be an authenticated request with an updated package, followed by an authenticated request to publish:

> curl \
-H "Authorization: Bearer $TOKEN"  \
-H "x-goog-api-version: 2" \
-X PUT \
-T $FILE_NAME \
-v \
https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID

> curl \
-H "Authorization: Bearer $TOKEN"  \
-H "x-goog-api-version: 2" \
-H "Content-Length: 0" \
-X POST \
-v \
https://www.googleapis.com/chromewebstore/v1.1/items/$APP_ID/publish

这篇关于如何自动将Chrome扩展程序发布到Web商店?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆