Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.

Commit 56dad13

Browse files
committed
Improved package
1 parent a7e209f commit 56dad13

File tree

6 files changed

+98
-85
lines changed

6 files changed

+98
-85
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ Assuming that you have installed this package, use below sample script to get st
4747

4848
```javascript
4949

50-
var sendinblue = require('../sendinblue-api');
51-
var sendinObj = new sendinblue('https://api.sendinblue.com/v2.0/', 'your_api_key', 5000); //Optional parameter: Timeout in MS
50+
var sendinblue = require('sendinblue-api');
51+
52+
var parameters = { "apiKey": "your_api_key", "timeout": 5000 }; //Optional parameter: Timeout in MS
53+
var sendinObj = new sendinblue(parameters);
5254

5355
var input = {};
5456
sendinObj.get_account(input, function(err, response){

examples/create_update_user.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
var sendinblue = require('../sendinblue-api');
2-
var sendinObj = new sendinblue('https://api.sendinblue.com/v2.0/', 'your_api_key', 5000);
1+
var sendinblue = require('sendinblue-api');
2+
3+
var parameters = { "apiKey": "your_api_key", "timeout": 5000 };
4+
var sendinObj = new sendinblue(parameters);
35

46
var input = { 'email': 'example@example.net',
57
'attributes': {

examples/delete_user.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
var sendinblue = require('../sendinblue-api');
2-
var sendinObj = new sendinblue('https://api.sendinblue.com/v2.0/', 'your_api_key', 5000);
1+
var sendinblue = require('sendinblue-api');
2+
3+
var parameters = { "apiKey": "your_api_key", "timeout": 5000 };
4+
var sendinObj = new sendinblue(parameters);
35

46
var input = { 'email': 'example@example.net' };
57

examples/get_account.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
var sendinblue = require('../sendinblue-api');
2-
var sendinObj = new sendinblue('https://api.sendinblue.com/v2.0', 'your_api_key', 5000);
1+
var sendinblue = require('sendinblue-api');
2+
3+
var parameters = { "apiKey": "your_api_key", "timeout": 5000 };
4+
var sendinObj = new sendinblue(parameters);
35

46
var input = {};
57
sendinObj.get_account(input, function(err, response){

examples/send_email.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
var sendinblue = require('../sendinblue-api');
2-
var sendinObj = new sendinblue('https://api.sendinblue.com/v2.0/', 'your_api_key', 5000);
1+
var sendinblue = require('sendinblue-api');
32

4-
var input = { 'to': { 'ektagupta@sendinblue': 'to whom!' },
3+
var parameters = { "apiKey": "your_api_key", "timeout": 5000 };
4+
var sendinObj = new sendinblue(parameters);
5+
6+
var input = { 'to': { 'to@example.net': 'to whom!' },
57
'from': ['from@email.com', 'from email!'],
68
'subject': 'Test mail form sendinblue',
79
'html': 'This is the <h1>HTML</h1>'
@@ -17,6 +19,8 @@ Output Response
1719
{
1820
code: 'success',
1921
message: 'Email sent successfully.',
20-
data:[]
22+
data:{
23+
"message-id":"<201607300811.57188159183@smtp-relay.sendinblue.com>"
24+
}
2125
}
2226
*/

0 commit comments

Comments
 (0)