Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A client interface for the Phonegap Build API using nodejs.
JavaScript
tree: bbbb2958ed

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.md
apiReader.js
apiWriter.js
interface.js
tools.js

README.md

PHONEGAP BUILD JS

A client interface for the Phonegap Build API using javascript

Dependencies:

Description

Phonegap Build JS is a client interface for the Phonegap Build API. Given that the API interacts using JSON-formatted strings, Javascript seems like the logical choice to process its input and output.

A commandline interface that partially implements the API has been provided.

   node interface.js

The interface allows you to interact with the API, but it is mainly provided to serve as an example on how to use the tool. You are encouraged to implement your own driver that fits your needs. Simply include the needed modules in your script.

Here's an example on how to display the user data on standard output:

   var reader = require('./apiReader');
   var writer = require('./apiWriter');

   writer.createAuthToken("my@email.com:myp4ssw0rd", {

      success:function(token){
 
         reader.getUserData(token, {
            success:function(userData){
               console.log(userData); //Output user data to stdout
               }, 
            error: function(errMsg){
               console.log("Error retrieving user data. Err: " + errMsg);
               }});         
         }, 
 
      error: function(errmsg){
         console.log("Error creating authentication token. Err: " + errmsg);
         }});
Something went wrong with that request. Please try again.