Skip to content

Commit

Permalink
Adding app domain handlers, bumping version for npm
Browse files Browse the repository at this point in the history
  • Loading branch information
DanBUK committed Feb 3, 2011
1 parent c30e7d8 commit 93e842f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions nodester.js
Expand Up @@ -124,4 +124,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;
2 changes: 1 addition & 1 deletion 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.2",
"homepage": "http://nodester.com/",
"repository": "git://github.com/nodester/nodester-api.git",
"author": "Daniel Bartlett <dan@f-box.org> (http://danb-uk.net/)",
Expand Down

0 comments on commit 93e842f

Please sign in to comment.