使用 Phonegap Build API 上传和构建

Upload and build with Phonegap Build API

我正在尝试将内容自动上传到 Phonegap Build 服务器。但是,我面临一些问题。

构建 API 页面有两组身份验证(这很好)。一个是token,一个是http-auth。

它对我来说并不是那么好用:

wget --user=XXX --password=XXX https://build.phonegap.com/token

HTTP request sent, awaiting response... 404 Not Found
2015-08-10 12:21:44 ERROR 404: Not Found.

使用另一种方法

wget --user=XXX --password=XXX https://build.phonegap.com/api/v1/me

HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to build.phonegap.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 629 [application/json]

第二个示例给了我一大块 json,其中包含用于应用程序、密钥等的内联指示符。这很好,但其中没有我需要能够 post 的授权密钥上传构建内容。

有什么想法吗?

/token 端点需要 POST 请求 (doc):

wget --user=XXX --password=XXX --post-data="" https://build.phonegap.com/token