Giter VIP home page Giter VIP logo

node-phonegap-build-api's Introduction

node-phonegap-build-api's People

Contributors

brianleroux avatar dave911d avatar filmaj avatar mwbrooks avatar purplecabbage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-phonegap-build-api's Issues

node js build API upload error 411

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

Phonegap + node js

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. -

Application packages download is not working

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'));
});

key_id in build options?

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);
});

Saved Token

Is there any way to call an api using previously saved token ?

Wrong hadnling of 302 redirects

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

Proxy

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)

Errors are not caught

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" }

Multi-part forms are not supported

There are a number of times when a multi-part POST is required.

Examples are:

  • creating an application
  • updating icons
  • uploading signing keys

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
});

Build Android without signing

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.