Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/nodester/nodester-api

  • Loading branch information...
commit 1210ae08a718cc96f986d0e9a4724c2d0607680a 2 parents be8a6d4 + 4fe39e2
@agnoster agnoster authored
Showing with 21 additions and 1 deletion.
  1. +20 −0 nodester.js
  2. +1 −1  package.json
View
20 nodester.js
@@ -106,6 +106,12 @@ nodester.prototype.app_info = function (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) {
request({uri: this.baseurl + "appnpm", method: 'POST', headers: headers, body: querystring.stringify({appname: name, package: package, action: action})}, function (err, response, body) {
cb(JSON.parse(body));
@@ -124,4 +130,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/)",
Please sign in to comment.
Something went wrong with that request. Please try again.