https://github.com/sendinblue/APIv3-typescript-library
SendinBlue's API v3 client
https://github.com/sendinblue/APIv3-typescript-library
api deprecated javascript nodejs obsolete sendinblue typescript
Last synced: 18 days ago
JSON representation
SendinBlue's API v3 client
- Host: GitHub
- URL: https://github.com/sendinblue/APIv3-typescript-library
- Owner: sendinblue
- Created: 2019-09-16T08:57:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-17T03:36:22.000Z (over 1 year ago)
- Last Synced: 2024-11-06T13:00:49.008Z (6 months ago)
- Topics: api, deprecated, javascript, nodejs, obsolete, sendinblue, typescript
- Language: TypeScript
- Homepage:
- Size: 867 KB
- Stars: 40
- Watchers: 5
- Forks: 19
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# [DEPRECATED:warning:] 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.
This is the wrapper for the API. It implements all the features of the API v3. It supports promises.
SendinBlue's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.sendinblue.com/v3/swagger_definition.yml).
## Installation
### For [Node.js](https://nodejs.org/)
#### npm
The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/).
Then install it via:
```shell
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
import * as SibApiV3Sdk from '@sendinblue/client'const apiInstance = new SibApiV3Sdk.AccountApi()
// Configure API key authorization: apiKey
apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')
apiInstance.getAccount().then(
function (data) {
console.log('API called successfully. Returned data: ', data.body)
},
function (error) {
console.error(error)
}
)
``````javascript
import * as SibApiV3Sdk from '@sendinblue/client'const apiInstance = new SibApiV3Sdk.ContactsApi()
// Configure API key authorization: apiKey
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 pageapiInstance.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)