Git Product home page Git Product logo

apiv3-typescript-library's Introduction

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 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. The specification can be downloaded here.

Installation

npm

The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs.

Then install it via:

npm install @sendinblue/client --save
# or
yarn add @sendinblue/client

Getting Started

Once you have installed the node module in your project, you can execute the following sample code JS code :

const SibApiV3Sdk = require('@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)
  }
)
const SibApiV3Sdk = require('@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 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

apiv3-typescript-library's People

Contributors

aayush-sib avatar ekta-slit avatar skynetsib avatar tanguyantoine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.