@dynopii/callchimp
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

callchimp@0.1.4

This TypeScript SDK provides a convenient wrapper for the Callchimp API, allowing developers to easily integrate Callchimp's functionalities into their TypeScript or JavaScript applications.

The generated Node module can be used in the following environments:

Environment

  • Node.js
  • Webpack
  • Browserify

Language level

  • ES5 - you must have a Promises/A+ library installed
  • ES6

Module system

  • CommonJS
  • ES6 module system

It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via package.json. (Reference)

Installation

Install the package using npm:

# using npm
npm install @dynopii/callchimp

# using pnpm
pnpm add @dynopii/callchimp

# using yarn
yarn add @dynopii/callchimp

Building

To build and compile the typescript sources to javascript use:

npm install
npm run build

Usage

First, import the necessary modules and configure the SDK with your API key:

import { CampaignsApi, Configuration } from '@dynopii/callchimp';

const config = new Configuration({
    basePath: "https://api.callchimp.ai/v1",
    apiKey: "YOUR_API_KEY"
});

const campaignsApi = new CampaignsApi(config);

Listing Campaigns

To list all campaigns:

async function listCampaigns() {
    try {
        const campaigns = await campaignsApi.campaignsList();
        console.log(campaigns);
    } catch (error) {
        console.error('Error fetching campaigns:', error);
    }
}

listCampaigns();

Documentation

For detailed API documentation and more examples, visit Callchimp API Documentation.

License

This SDK is released under the MIT License.

Package Sidebar

Install

npm i @dynopii/callchimp

Weekly Downloads

6

Version

0.1.4

License

MIT

Unpacked Size

1.15 MB

Total Files

202

Last publish

Collaborators

  • xprilion