ares-ide
Version:
A browser-based code editor and UI designer for Enyo 2 projects
325 lines (269 loc) • 8.08 kB
JavaScript
var client = require('./lib/client');
var fs = require('fs');
var options = {
username: 'michael.brooks@nitobi.com',
password: '28663354'
//proxy: 'http://127.0.0.1:8888'
};
//
// Authentication
//
client.auth(options, function(e, api) {
console.log('error:', e);
console.log('api:', api);
});
//options = {
// 'token': 'Z9nGxwX7qenyuNXSaEnp'
//};
//
// GET https://build.phonegap.com/api/v1/me
//
//client.auth(options, function(e, api) {
// api.get('/me', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// GET https://build.phonegap.com/api/v1/apps
//
//client.auth(options, function(e, api) {
// api.get('/apps', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// GET https://build.phonegap.com/api/v1/apps/:id
//
//client.auth(options, function(e, api) {
// api.get('/apps/199692', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// GET https://build.phonegap.com/api/v1/apps/:id/icon
//
//client.auth(options, function(e, api) {
// api.get('/apps/199692/icon').pipe(fs.createWriteStream('icon.png'));
//});
//
// GET https://build.phonegap.com/api/v1/apps/:id/:platform
//
//client.auth(options, function(e, api) {
// api.get('/apps/199692/android').pipe(fs.createWriteStream('android.apk'));
//});
//
// GET https://build.phonegap.com/api/v1/keys
//
//client.auth(options, function(e, api) {
// api.get('/keys', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// GET https://build.phonegap.com/api/v1/keys/:platform
//
//client.auth(options, function(e, api) {
// api.get('/keys/ios', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// GET https://build.phonegap.com/api/v1/keys/:platform/:id
//
//client.auth(options, function(e, api) {
// api.get('/keys/ios/917', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/apps
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// title: 'My App',
// create_method: 'file',
// debug: false
// },
// file: '/Users/mwbrooks/Development/app/phonegap-start/app.zip'
// }
// };
// api.post('/apps', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// PUT https://build.phonegap.com/api/v1/apps/:id
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// 'debug': true
// }
// }
// };
// api.put('/apps/197196', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//client.auth(options, function(e, api) {
// var options = {
// form: {
// file: '/Users/mwbrooks/Development/app/phonegap-start/app.zip'
// }
// };
// api.put('/apps/274937', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/apps/:id/icon
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// icon: 'icon-64.png'
// }
// };
// api.post('/apps/232741/icon', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/apps/:id/build
//
//client.auth(options, function(e, api) {
// api.post('/apps/232741/build', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// platforms: [ 'android', 'winphone', 'webos' ]
// }
// }
// };
// api.post('/apps/232741/build', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/apps/:id/build
//
//client.auth(options, function(e, api) {
// api.post('/apps/232741/build/android', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/apps/:id/collaborators
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// email: 'michael@michaelbrooks.ca',
// role: 'dev'
// }
// }
// };
// api.post('/apps/232741/collaborators', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// PUT https://build.phonegap.com/api/v1/apps/:id/collaborators/:id
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// role: 'tester'
// }
// }
// };
// api.put('/apps/232741/collaborators/263955', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// POST https://build.phonegap.com/api/v1/keys/:platform
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// title: 'Shell',
// password: 'deez_Nut$'
// },
// db: '/Users/mwbrooks/Downloads/signing-keys/sigtool.db',
// csk: '/Users/mwbrooks/Downloads/signing-keys/sigtool.csk'
// }
// };
// api.post('/keys/blackberry', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// PUT https://build.phonegap.com/api/v1/keys/:platform/:id
//
//client.auth(options, function(e, api) {
// var options = {
// form: {
// data: {
// password: 'deez_Nut$'
// }
// }
// };
// api.put('/keys/blackberry/1505', options, function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// DELETE https://build.phonegap.com/api/v1/apps/:id
//
//client.auth(options, function(e, api) {
// api.del('/apps/14450', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// DELETE https://build.phonegap.com/api/v1/apps/:id/collaborators/:id
//
//client.auth(options, function(e, api) {
// api.del('/apps/232741/collaborators/263955', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});
//
// DELETE https://build.phonegap.com/api/v1/keys/:platform/:id
//
//client.auth(options, function(e, api) {
// api.del('/keys/ios/2729', function(e, data) {
// console.log('error:', e);
// console.log('data:', data);
// });
//});