Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added in env_set, env_get, and env_delete.

  • Loading branch information...
commit 97f75b6267c1f7b3c34219ff98b7de4fe247cd7c 1 parent 5953979
Michael Smith authored February 25, 2012
16  lib/nodester.js
@@ -196,6 +196,22 @@
196 196
       return this.get("appdomains", cb);
197 197
     };
198 198
 
  199
+    Nodester.prototype.env_set = function(name, key, value, cb) {
  200
+      return this.put("env", {
  201
+        appname: name,
  202
+        key: key,
  203
+        value: value
  204
+      }, cb);
  205
+    };
  206
+
  207
+    Nodester.prototype.env_delete = function(name, key, cb) {
  208
+      return this.del("env/" + (escape(name)) + "/" + (escape(key)), cb);
  209
+    };
  210
+
  211
+    Nodester.prototype.env_get = function(name, cb) {
  212
+      return this.get("env/" + (escape(name)), cb);
  213
+    };
  214
+
199 215
     return Nodester;
200 216
 
201 217
   })();
4  src/nodester.coffee
@@ -68,6 +68,10 @@ class Nodester
68 68
   appdomain_delete: (name, domain, cb) -> @del "appdomains", {appname: name, domain: domain}, cb
69 69
 
70 70
   appdomains: (cb) -> @get "appdomains", cb
  71
+
  72
+  env_set: (name, key, value, cb) -> @put "env", {appname: name, key: key, value: value}, cb
  73
+  env_delete: (name, key, cb) -> @del "env/#{escape(name)}/#{escape(key)}", cb
  74
+  env_get: (name, cb) -> @get "env/#{escape(name)}", cb
71 75
   
72 76
 handleResponse = (cb) ->
73 77
   return (err, res, body) =>  

0 notes on commit 97f75b6

Please sign in to comment.
Something went wrong with that request. Please try again.