Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
wwwroot/*.js
dist/
node_modules
typings
dist
23 changes: 0 additions & 23 deletions .openapi-generator-ignore

This file was deleted.

1 change: 0 additions & 1 deletion .openapi-generator/VERSION

This file was deleted.

9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

67 changes: 39 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# APIv3-typescript-library

SendinBlue's API v3 TypeScript-Node Library

SendinBlue's API exposes the entire SendinBlue features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.sendinblue.com) to learn more.
Expand All @@ -18,52 +19,62 @@ The following recommended installation requires [npm](https://npmjs.org/). If yo
Then install it via:

```shell
npm install sib-api-v3-typescript --save
npm install @sendinblue/client --save
# or
yarn add @sendinblue/client
```

## Getting Started

Once you have [installed](#installation) the node module in your project, you can execute the following sample code JS code :

```javascript
const SibApiV3Sdk = require('sib-api-v3-typescript');
const SibApiV3Sdk = require('@sendinblue/client')

let 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);
}, function(error) {
console.error(error);
});
apiInstance.getAccount().then(
function (data) {
console.log('API called successfully. Returned data: ', data.body)
},
function (error) {
console.error(error)
}
)
```

```javascript
const SibApiV3Sdk = require('sib-api-v3-typescript');
const SibApiV3Sdk = require('@sendinblue/client')

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

// Configure API key authorization: apiKey

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

let limit = 10; // Number | Number of documents per page
let 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);
apiInstance.getAttributes().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});

}, function(error) {
console.error(error);
});
apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.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

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

For more examples, refer the [Endpoints Guide](https://developers.sendinblue.com/reference)
For more examples, refer the [Endpoints Guide](https://developers.sendinblue.com/reference)
2 changes: 0 additions & 2 deletions api.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions api.js

This file was deleted.

1 change: 0 additions & 1 deletion api.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions api.ts

This file was deleted.

35 changes: 0 additions & 35 deletions api/accountApi.d.ts

This file was deleted.

137 changes: 0 additions & 137 deletions api/accountApi.js

This file was deleted.

1 change: 0 additions & 1 deletion api/accountApi.js.map

This file was deleted.

Loading