Skip to content

Commit 2167ca9

Browse files
author
TANGUY Antoine
committed
docs: good working example
1 parent bd663f8 commit 2167ca9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Once you have [installed](#installation) the node module in your project, you ca
3131
```javascript
3232
const SibApiV3Sdk = require('@sendinblue/client')
3333

34-
let apiInstance = new SibApiV3Sdk.AccountApi()
34+
const apiInstance = new SibApiV3Sdk.AccountApi()
3535

3636
// Configure API key authorization: apiKey
3737

3838
apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')
3939

4040
apiInstance.getAccount().then(
4141
function (data) {
42-
console.log('API called successfully. Returned data: ' + data)
42+
console.log('API called successfully. Returned data: ', data.body)
4343
},
4444
function (error) {
4545
console.error(error)
@@ -50,21 +50,21 @@ apiInstance.getAccount().then(
5050
```javascript
5151
const SibApiV3Sdk = require('@sendinblue/client')
5252

53-
let apiInstance = new SibApiV3Sdk.ContactsApi()
53+
const apiInstance = new SibApiV3Sdk.ContactsApi()
5454

5555
// Configure API key authorization: apiKey
5656

5757
apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')
5858

59-
let limit = 10 // Number | Number of documents per page
60-
let offset = 0 // Number | Index of the first document of the page
59+
const limit = 10 // Number | Number of documents per page
60+
const offset = 0 // Number | Index of the first document of the page
6161

6262
apiInstance.getLists(limit, offset).then(
6363
function (data) {
64-
console.log('API called successfully. Returned data: ' + data)
64+
console.log('API called successfully. Returned data: ', data.body)
6565
apiInstance.getAttributes().then(
6666
function (data) {
67-
console.log('API called successfully. Returned data: ' + data)
67+
console.log('API called successfully. Returned data: ', data.body)
6868
},
6969
function (error) {
7070
console.error(error)

0 commit comments

Comments
 (0)