Commits

Dustin Shields-Cloues committed 22c2e3b

Rebuild after an accidental downgrade to coffeescript 1.2

  • Participants
  • Parent commits c54b6ed
  • Tags 1.0.15

Comments (0)

Files changed (3)

File mandrill.coffee

     port:   443,
     prefix: '/api/1.0/',
     method: 'POST',
-    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.14'}
+    headers: {'Content-Type': 'application/json', 'User-Agent': 'Mandrill-Node/1.0.15'}
 }
 
 class exports.Mandrill
+// Generated by CoffeeScript 1.3.3
 (function() {
   var Inbound, Internal, Messages, OPTS, Rejects, Senders, Tags, Templates, Urls, Users, Webhooks, https;
 
     method: 'POST',
     headers: {
       'Content-Type': 'application/json',
-      'User-Agent': 'Mandrill-Node/1.0.14'
+      'User-Agent': 'Mandrill-Node/1.0.15'
     }
   };
 
       this.urls = new Urls(this);
       this.webhooks = new Webhooks(this);
       this.senders = new Senders(this);
-      if (this.apikey === null) this.apikey = process.env['MANDRILL_APIKEY'];
+      if (this.apikey === null) {
+        this.apikey = process.env['MANDRILL_APIKEY'];
+      }
     }
 
     Mandrill.prototype.call = function(uri, params, onresult, onerror) {
       var req,
         _this = this;
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       params.key = this.apikey;
       params = new Buffer(JSON.stringify(params), 'utf8');
       if (this.debug) {
               return _this.onerror(json);
             }
           } else {
-            if (onresult) return onresult(json);
+            if (onresult) {
+              return onresult(json);
+            }
           }
         });
       });
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.add = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["publish"] == null) params["publish"] = true;
+      if ((_ref = params["publish"]) == null) {
+        params["publish"] = true;
+      }
       return this.master.call('templates/add', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.info = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.update = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["publish"] == null) params["publish"] = true;
+      if ((_ref = params["publish"]) == null) {
+        params["publish"] = true;
+      }
       return this.master.call('templates/update', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.publish = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype["delete"] = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.timeSeries = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Templates.prototype.render = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["merge_vars"] == null) params["merge_vars"] = null;
+      if ((_ref = params["merge_vars"]) == null) {
+        params["merge_vars"] = null;
+      }
       return this.master.call('templates/render', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Users.prototype.info = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Users.prototype.ping = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Users.prototype.ping2 = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Users.prototype.senders = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Rejects.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref, _ref1;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["email"] == null) params["email"] = null;
-      if (params["include_expired"] == null) params["include_expired"] = false;
+      if ((_ref = params["email"]) == null) {
+        params["email"] = null;
+      }
+      if ((_ref1 = params["include_expired"]) == null) {
+        params["include_expired"] = false;
+      }
       return this.master.call('rejects/list', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Rejects.prototype["delete"] = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Inbound.prototype.domains = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Inbound.prototype.routes = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Inbound.prototype.sendRaw = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["to"] == null) params["to"] = null;
+      if ((_ref = params["to"]) == null) {
+        params["to"] = null;
+      }
       return this.master.call('inbound/send-raw', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Tags.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Tags.prototype["delete"] = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Tags.prototype.info = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Tags.prototype.timeSeries = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Tags.prototype.allTimeSeries = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Messages.prototype.send = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["async"] == null) params["async"] = false;
+      if ((_ref = params["async"]) == null) {
+        params["async"] = false;
+      }
       return this.master.call('messages/send', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Messages.prototype.sendTemplate = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["async"] == null) params["async"] = false;
+      if ((_ref = params["async"]) == null) {
+        params["async"] = false;
+      }
       return this.master.call('messages/send-template', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Messages.prototype.search = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["query"] == null) params["query"] = '*';
-      if (params["date_from"] == null) params["date_from"] = null;
-      if (params["date_to"] == null) params["date_to"] = null;
-      if (params["tags"] == null) params["tags"] = null;
-      if (params["senders"] == null) params["senders"] = null;
-      if (params["limit"] == null) params["limit"] = 100;
+      if ((_ref = params["query"]) == null) {
+        params["query"] = '*';
+      }
+      if ((_ref1 = params["date_from"]) == null) {
+        params["date_from"] = null;
+      }
+      if ((_ref2 = params["date_to"]) == null) {
+        params["date_to"] = null;
+      }
+      if ((_ref3 = params["tags"]) == null) {
+        params["tags"] = null;
+      }
+      if ((_ref4 = params["senders"]) == null) {
+        params["senders"] = null;
+      }
+      if ((_ref5 = params["limit"]) == null) {
+        params["limit"] = 100;
+      }
       return this.master.call('messages/search', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Messages.prototype.parse = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Messages.prototype.sendRaw = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref, _ref1, _ref2, _ref3;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["from_email"] == null) params["from_email"] = null;
-      if (params["from_name"] == null) params["from_name"] = null;
-      if (params["to"] == null) params["to"] = null;
-      if (params["async"] == null) params["async"] = false;
+      if ((_ref = params["from_email"]) == null) {
+        params["from_email"] = null;
+      }
+      if ((_ref1 = params["from_name"]) == null) {
+        params["from_name"] = null;
+      }
+      if ((_ref2 = params["to"]) == null) {
+        params["to"] = null;
+      }
+      if ((_ref3 = params["async"]) == null) {
+        params["async"] = false;
+      }
       return this.master.call('messages/send-raw', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Urls.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Urls.prototype.search = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Urls.prototype.timeSeries = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Webhooks.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Webhooks.prototype.add = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["events"] == null) params["events"] = [];
+      if ((_ref = params["events"]) == null) {
+        params["events"] = [];
+      }
       return this.master.call('webhooks/add', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Webhooks.prototype.info = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Webhooks.prototype.update = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      var _ref;
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         params = {};
       }
-      if (params["events"] == null) params["events"] = [];
+      if ((_ref = params["events"]) == null) {
+        params["events"] = [];
+      }
       return this.master.call('webhooks/update', params, onsuccess, onerror);
     };
 
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Webhooks.prototype["delete"] = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Senders.prototype.list = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Senders.prototype.domains = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Senders.prototype.info = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;
         @param {Function} onerror an optional callback to execute when the API call errors out - defaults to throwing the error as an exception
     */
 
+
     Senders.prototype.timeSeries = function(params, onsuccess, onerror) {
-      if (params == null) params = {};
+      if (params == null) {
+        params = {};
+      }
       if (typeof params === 'function') {
         onerror = onsuccess;
         onsuccess = params;

File package.json

   "author": "Mandrill Devs <community@mandrill.com> (http://mandrill.com)",
   "name": "mandrill-api",
   "description": "The official API client for the Mandrill email as a service product.",
-  "version": "1.0.14",
+  "version": "1.0.15",
   "homepage": "https://bitbucket.org/mailchimp/mandrill-api-node",
   "repository": {
     "type": "git",