8000 Handled error on get and post requests by ishaanbahal · Pull Request #2 · HashGo/node-datadog · GitHub
[go: up one dir, main page]

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var DataDog = function(apiKey, applicationKey, opt_apiBaseUrl) {
}

this.apiBaseUrl = opt_apiBaseUrl;

this.apiKey = apiKey;
this.applicationKey = applicationKey;

};

DataDog.prototype.postEvent = function(event, callback) {
Expand All @@ -20,9 +20,9 @@ DataDog.prototype.postEvent = function(event, callback) {
},
json: event
},
callback);
};

callback).on('error', function(e) {
console.log(e.message);
});

DataDog.prototype.postSeries = function(series, callback) {
request.post({
Expand All @@ -33,9 +33,9 @@ DataDog.prototype.postSeries = function(series, callback) {
},
json: series
},
callback);
};

callback).on('error', function(e) {
console.log(e.message);
});

DataDog.prototype.search = function(queryString, callback) {
request.get({
Expand All @@ -45,8 +45,8 @@ DataDog.prototype.search = function(queryString, callback) {
application_key: this.applicationKey
}
},
callback);
};

callback).on('error', function(e) {
console.log(e.message);
});

module.exports = DataDog;
0