Permalink
Browse files

Merge branch 'master' into error_handling

  • Loading branch information...
2 parents b85da25 + 1210ae0 commit e082e0830dda76db7e2bd71268f1f90ede87e7de @agnoster agnoster committed Feb 6, 2011
Showing with 21 additions and 1 deletion.
  1. +20 −0 nodester.js
  2. +1 −1 package.json
View
20 nodester.js
@@ -128,6 +128,12 @@ nodester.prototype.app_info = function (name, cb) {
this.get('app/' + name, cb);
};
+nodester.prototype.app_logs = function (name, cb) {
+ request({uri: this.baseurl + "applogs/" + name, method: 'GET', headers: headers}, function (err, response, body) {
+ cb(JSON.parse(body));
+ });
+};
+
nodester.prototype.appnpm_handler = function (name, package, action, cb) {
this.post('appnpm', { appname: name, package: package, action: action }, cb);
};
@@ -144,4 +150,18 @@ nodester.prototype.appnpm_uninstall = function (name, package, cb) {
this.appnpm_handler(name, package, "uninstall", cb);
};
+nodester.prototype.appdomain_handler = function (name, domain, action, cb) {
+ request({uri: this.baseurl + "appdomains", method: 'POST', headers: headers, body: querystring.stringify({appname: name, action: action, domain: domain})}, function (err, resp, body) {
+ cb(JSON.parse(body));
+ });
+};
+
+nodester.prototype.appdomain_add = function (name, domain, cb) {
+ this.appdomain_handler(name, domain, "add", cb);
+};
+
+nodester.prototype.appdomain_delete = function (name, domain, cb) {
+ this.appdomain_handler(name, domain, "delete", cb);
+};
+
exports.nodester = nodester;
View
2 package.json
@@ -1,7 +1,7 @@
{
"name": "nodester-api",
"description": "A module to allow interaction with the http://nodester.com/ platform.",
- "version": "0.1.0",
+ "version": "0.1.3",
"homepage": "http://nodester.com/",
"repository": "git://github.com/nodester/nodester-api.git",
"author": "Daniel Bartlett <dan@f-box.org> (http://danb-uk.net/)",

0 comments on commit e082e08

Please sign in to comment.