Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrected setApiKey for Contacts api #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,52 @@ yarn add @sendinblue/client
Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code :

```javascript
const SibApiV3Sdk = require('@sendinblue/client')
const SibApiV3Sdk = require("@sendinblue/client");

const apiInstance = new SibApiV3Sdk.AccountApi()
const apiInstance = new SibApiV3Sdk.AccountApi();

// Configure API key authorization: apiKey

apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')
apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, "YOUR API KEY");

apiInstance.getAccount().then(
function (data) {
console.log('API called successfully. Returned data: ', data.body)
console.log("API called successfully. Returned data: ", data.body);
},
function (error) {
console.error(error)
console.error(error);
}
)
);
```

```javascript
const SibApiV3Sdk = require('@sendinblue/client')
const SibApiV3Sdk = require("@sendinblue/client");

const apiInstance = new SibApiV3Sdk.ContactsApi()
const apiInstance = new SibApiV3Sdk.ContactsApi();

// Configure API key authorization: apiKey

apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')
apiInstance.setApiKey(SibApiV3Sdk.ContactsApiApiKeys.apiKey, "YOUR API KEY");

const limit = 10 // Number | Number of documents per page
const offset = 0 // Number | Index of the first document of the page
const limit = 10; // Number | Number of documents per page
const offset = 0; // Number | Index of the first document of the page

apiInstance.getLists(limit, offset).then(
function (data) {
console.log('API called successfully. Returned data: ', data.body)
console.log("API called successfully. Returned data: ", data.body);
apiInstance.getAttributes().then(
function (data) {
console.log('API called successfully. Returned data: ', data.body)
console.log("API called successfully. Returned data: ", data.body);
},
function (error) {
console.error(error)
console.error(error);
}
)
);
},
function (error) {
console.error(error)
console.error(error);
}
)
);
```

For more examples, refer the [Endpoints Guide](https://developers.sendinblue.com/reference)