summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/sendgrid.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sendgrid.js b/lib/sendgrid.js
index 38d65e0..4150935 100644
--- a/lib/sendgrid.js
+++ b/lib/sendgrid.js
@@ -75,7 +75,7 @@ function SendGrid(apiKey, host, globalHeaders) {
var client = new Client(globalRequest);
//Interact with the API with this function
- this.API = function(request, callback) {
+ SendGrid.API = function(request, callback) {
//If no callback provided, we will return a promise
if (!callback) {
@@ -109,9 +109,9 @@ function SendGrid(apiKey, host, globalHeaders) {
};
//Set requests
- this.emptyRequest = getEmptyRequest;
- this.globalRequest = globalRequest;
- return this;
+ SendGrid.emptyRequest = getEmptyRequest;
+ SendGrid.globalRequest = globalRequest;
+ return SendGrid;
}
//Try to use native promises by default