Easily create apps using the web technologies you know and love: HTML, CSS, and JavaScript
Check out the Github Organization for all of our projects.
Node.js REST Client for the PhoneGap Build API
License: Apache License 2.0
Easily create apps using the web technologies you know and love: HTML, CSS, and JavaScript
Check out the Github Organization for all of our projects.
The nodejs API for phonegap build (phonegap-build-api module v1) has started giving 411 error today.
[error]
411 Length Required
411 Length Required
nginx
Seems to be happening on the CLI too.
INF] -phonegap-build:
[INF]
[INF] -phonegap-remote-login:
[INF]
[INF] -phonegap-remote-build:
[INF] [shellscript] [phonegap] compressing the app...
[INF] [shellscript] [phonegap] uploading the app...
[INF] [shellscript] [Error:
[INF] [shellscript] 411 Length Required [error]
[INF] [shellscript]
[INF] [shellscript] 411 Length Required
Happens on 3.4.0 and 3.5.0
Hello!
Ignorant question, how do I integrate a PhoneGap project with node js, ie I and I have my project with node js but I want to run mobile with PhoneGap, I don't know how integrate, where they and other files.
And on the web I found nothing
Thanks for the help!
Raul. -
DELETE https://build.phonegap.com/api/v1/apps/:id/collaborators/:id
Hey all,
does this rest implementation still work? I have had several app builds with missing files when using the api rest client. When I use the PhoneGap "Update code" everything seems to work;
i've seen stack overflow posts mentioning the fact that everything should be multipart encoded when submitting to the service or else the file upload will fail or corrupt; is that correct?
GET https://build.phonegap.com/api/v1/keys
This is a known feature / issue with node.js.
This can be fixed with a library such as tide-expansion.
GET https://build.phonegap.com/api/v1/keys/:platform
The following example code times out: It is not possible to download the built apps using Node.js. Download from the web-app still works fine.
/*!
* Module dependencies.
*/
var fs = require('fs');
var client = require('phonegap-build-api');
/*!
* GET https://build.phonegap.com/api/v1/apps/:id/:platform
*/
var options = {
username: '[email protected]',
password: 'yyyy'
};
client.auth(options, function(e, api) {
api.get('/apps/427391/android').pipe(fs.createWriteStream('android.apk'));
});
GET https://build.phonegap.com/api/v1/apps/:id/icon
After submitting the build via the API, we are still required to manually select the signing key for the platform(s) by going to build.phonegap.com. This breaks the automation.
Is there a way to provide iOS/Android signing key in the build API?
var options = {
form: {
data: {
title: 'My App',
create_method: 'file'
},
file: '/path/to/app.zip',
ios_key_id: 123456789 // <---- is this possible?
}
};
api.post('/apps', options, function(e, data) {
console.log('error:', e);
console.log('data:', data);
});
Is there any way to call an api using previously saved token ?
GET https://build.phonegap.com/api/v1/apps/:id
Reference: https://build.phonegap.com/docs/read_api
DELETE https://build.phonegap.com/api/v1/keys/:platform/:id
Hi everybody,
To describe this issue let's start from official Read API docs: https://build.phonegap.com/docs/read_api
For example the GET https://build.phonegap.com/api/v1/apps/:id/icon method contains the description of two different behaviors:
"In the successful case, this API method will return a 302 redirect to the icon file - the actual body of the response will point to the resource in question"
That means, that if we will follow the 302 redirect, than we will recieve the actual icon data, in other case - we should get the object with the location field, which points to the requested resource.
{
"location":"http://s3.amazonaws.com/build.phonegap.com/some-long-guid/icon.png"
}
Currently, if we pass the followRedirect: false
to API call, than we get the response in err parameter of callback, wrapped into Error object. So, considering the next example:
api.get(path, {followRedirect: false}, function(err, data) {
return cb(err, data);
});
... we will get the undefined
data param, and [Error: "{location: "..."}"] in error param.
Link to the root of issue: https://github.com/phonegap/node-phonegap-build-api/blob/master/lib/api.js#L208
Regards
POST https://build.phonegap.com/api/v1/apps/:id/collaborators
GET https://build.phonegap.com/api/v1/me
Implement as lib/user.js
GET https://build.phonegap.com/api/v1/apps
Reference: https://build.phonegap.com/docs/read_api
Seems to have trouble connecting to PhoneGap build when behind a http proxy.
api.get('/me', function(e, data) {
^
TypeError: Cannot call method 'get' of undefined
at repl:3:5
at Request.module.exports [as _callback](C:Program Filesnodejsnode_modulesphonegap-build-apilibauth.js:59:13)
at Request.init.self.callback (C:\Program Files\nodejs\node_modules\phonegap-build-api\node_modules\request\main.js:122:22)
at Request.EventEmitter.emit (events.js:96:17)
at ClientRequest.Request.init.self.clientErrorHandler (C:\Program Files\nodejs\node_modules\phonegap-build-api\node_modules\request\main.js:224:10
)
at ClientRequest.EventEmitter.emit (events.js:96:17)
at CleartextStream.socketErrorListener (http.js:1411:9)
at CleartextStream.EventEmitter.emit (events.js:96:17)
at Socket.onerror (tls.js:1336:17)
at Socket.EventEmitter.emit (events.js:126:20)
To get a little code quality insight.
POST https://build.phonegap.com/api/v1/apps/:id/build/:platform
POST https://build.phonegap.com/api/v1/apps/:id/:icon
DELETE https://build.phonegap.com/api/v1/apps/:id
GET https://build.phonegap.com/api/v1/keys/:platform/:id
POST https://build.phonegap.com/api/v1/apps
GET https://build.phonegap.com/api/v1/apps/:id/:platform
POST https://build.phonegap.com/api/v1/keys/:platform
Currently if you click on a link from the readme.md page you'll actually go to it which is absolutely useless. Instead, please update the links so you'll get to the api documentation about that link
PUT https://build.phonegap.com/api/v1/apps/:id
Currently, http request errors are caught but PhoneGap Build response errors are not.
When a request is invalid, PhoneGap Build returns a JSON response of the format:
{ "error": "something something" }
There are a number of times when a multi-part POST is required.
Examples are:
Currently, only URL encoded form data is supported, which means binary files cannot be uploaded.
A suggestion solution is to add a file
key to the options
argument of a post request. Whenever the file
key exists, a multi-part form request is used.
var data = {
data: {
title: 'App name',
create_method: 'file'
},
file: {
file: 'path/to/app.zip'
}
};
api.post(data, function(e, response) {
// do stuff
});
Look into providing a callback to track the file upload progress.
I would like to generate an .apk without singing. This option on the PhoneGap Build website as "No Key selected". How can i replicate this functionality using this library. Thanks for the help.
PUT https://build.phonegap.com/api/v1/apps/:id/collaborators/:id
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.