From 5b59d569ed2c8f18866ee45741d25522f841a5ce Mon Sep 17 00:00:00 2001 From: Tim Noel Date: Wed, 10 Dec 2014 13:34:34 -0500 Subject: [PATCH] MA-1155 #time 20m Changed sparkpost to SparkPost --- lib/SendGridCompatibility/Email.js | 16 ++++++------ lib/SendGridCompatibility/index.js | 42 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/SendGridCompatibility/Email.js b/lib/SendGridCompatibility/Email.js index b59d2d4..a523122 100644 --- a/lib/SendGridCompatibility/Email.js +++ b/lib/SendGridCompatibility/Email.js @@ -12,7 +12,7 @@ function Email(options){ } /** - * Sendgrid email compatibility functions + * SendGrid email compatibility functions * * @param Most have a single value to map * Add functions will often contain a key / value pair @@ -70,31 +70,31 @@ Email.prototype.addSection = function (key, value){ Email.prototype.setSections = function (sections){ this.section = sections; }; -// Sparkpost doesn't currently support addUniqueArg, throw an error +// SparkPost doesn't currently support addUniqueArg, throw an error Email.prototype.addUniqueArg = function (){ throw new Error('Unique Argument compatibility is not supported.'); }; -// Sparkpost doesn't currently support setUniqueArgs, throw an error +// SparkPost doesn't currently support setUniqueArgs, throw an error Email.prototype.setUniqueArgs = function (){ throw new Error('Unique Argument compatibility is not supported.'); }; -// Sparkpost doesn't currently support addCategory, throw an error +// SparkPost doesn't currently support addCategory, throw an error Email.prototype.addCategory = function (){ throw new Error('Category compatibility is not supported.'); }; -// Sparkpost doesn't currently support setCategories, throw an error +// SparkPost doesn't currently support setCategories, throw an error Email.prototype.setCategories = function (){ throw new Error('Category compatibility is not supported.'); }; -// Sparkpost doesn't currently support addFilter, throw an error +// SparkPost doesn't currently support addFilter, throw an error Email.prototype.addFilter = function (){ throw new Error('Filter compatibility is not supported.'); }; -// Sparkpost doesn't currently support setFilters, throw an error +// SparkPost doesn't currently support setFilters, throw an error Email.prototype.setFilters = function (){ throw new Error('Filter compatibility is not supported.'); }; -// Sparkpost doesn't currently support addFile, throw an error +// SparkPost doesn't currently support addFile, throw an error Email.prototype.addFile = function (){ throw new Error('File compatibility is not supported.'); }; diff --git a/lib/SendGridCompatibility/index.js b/lib/SendGridCompatibility/index.js index 54bcf93..e3a5003 100644 --- a/lib/SendGridCompatibility/index.js +++ b/lib/SendGridCompatibility/index.js @@ -4,12 +4,12 @@ var transmission = require('../transmission'); var configuration = require('../configuration'); /** - * Sendgrid compatibility constructor + * SendGrid compatibility constructor * Responsible for taking the api key and config options and - * translating them into a format compatible with sparkpost's + * translating them into a format compatible with SparkPost's * configuration.setConfig function. * - * @param username: dropped sendgrid username string + * @param username: dropped SendGrid username string * @param apiKey: api key string * @param options: optional additional options object */ @@ -25,10 +25,10 @@ var sendgrid = function(username, apiKey, options) { }; /** - * Private Method for translating a user's sendgrid config options - * to a sparkpost compatible set by dropping unnecessary data + * Private Method for translating a user's SendGrid config options + * to a SparkPost compatible set by dropping unnecessary data * - * @param payload: sendgrid formatted config options object + * @param payload: SendGrid formatted config options object * @returns object: config options with incompatible entries removed */ var translateConfig = function(options) { @@ -46,12 +46,12 @@ var translateConfig = function(options) { }; /** - * Private Method for translating a user's sendgrid substitutions and sections - * to a consolidated sparkpost substitutionData object + * Private Method for translating a user's SendGrid substitutions and sections + * to a consolidated SparkPost substitutionData object * - * @param payload: sendgrid formatted object or sendgrid Email object to - * be translated into a sparkpost payload - * @returns object: substitutionData object as per sparkpost payload format + * @param payload: SendGrid formatted object or SendGrid Email object to + * be translated into a SparkPost payload + * @returns object: substitutionData object as per SparkPost payload format */ var consolidateSubstitutionData = function(payload) { var substitutionData = {}; @@ -66,12 +66,12 @@ var consolidateSubstitutionData = function(payload) { }; /** - * Private Method for translating a user's sendgrid to and toname to a recipients + * Private Method for translating a user's SendGrid to and toname to a recipients * array that the transmissions "Class" can understand * - * @param payload: sendgrid formatted object or sendgrid Email object to - * be translated into a sparkpost payload - * @returns array: recipients array as per sparkpost payload format + * @param payload: SendGrid formatted object or SendGrid Email object to + * be translated into a SparkPost payload + * @returns array: recipients array as per SparkPost payload format */ var parseTo = function(payload){ var recipients = []; @@ -93,12 +93,12 @@ var parseTo = function(payload){ }; /** - * Private Method for translating a user's sendgrid payload to a format + * Private Method for translating a user's SendGrid payload to a format * that the transmissions "Class" can understand * - * @param payload: sendgrid formatted object or sendgrid Email object to - * be translated into a sparkpost payload - * @returns object: translation from sendgrid payload to sparkpost payload + * @param payload: SendGrid formatted object or SendGrid Email object to + * be translated into a SparkPost payload + * @returns object: translation from SendGrid payload to SparkPost payload */ var translatePayload = function(payload) { var sub = consolidateSubstitutionData(payload) @@ -132,8 +132,8 @@ var translatePayload = function(payload) { * private helper methods to translate an Email or inline object * and then pass that content to the transmissions send function. * - * @param payload: sendgrid formatted object or sendgrid Email object to - * be translated into a sparkpost payload and sent + * @param payload: SendGrid formatted object or SendGrid Email object to + * be translated into a SparkPost payload and sent */ sendgrid.prototype.send = function(payload, callback) { var translated = translatePayload(payload);