Skip to content

Commit

Permalink
Update examples and tests with new callback signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Buczynski committed Jul 27, 2016
1 parent 7cc13ef commit 11d6791
Show file tree
Hide file tree
Showing 30 changed files with 686 additions and 686 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The following is the minimum needed code to send an email with the [/mail/send H
request.method = 'POST'
request.path = '/v3/mail/send'
request.body = requestBody
sg.API(request, function (response) {
sg.API(request, function (error, response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
Expand Down Expand Up @@ -122,7 +122,7 @@ request.body = {
};
request.method = 'POST'
request.path = '/v3/mail/send'
sg.API(request, function (response) {
sg.API(request, function (error, response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
Expand All @@ -138,7 +138,7 @@ var sg = require('sendgrid').SendGrid(process.env.SENDGRID_API_KEY)
var request = sg.emptyRequest()
request.method = 'GET'
request.path = '/v3/api_keys'
sg.API(request, function (response) {
sg.API(request, function (error, response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
Expand Down
2 changes: 1 addition & 1 deletion TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To read the error message returned by SendGrid's API:
request.method = 'POST'
request.path = '/v3/mail/send'
request.body = requestBody
sg.API(request, function (response) {
sg.API(request, function (error, response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
Expand Down
Loading

0 comments on commit 11d6791

Please sign in to comment.