New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@leafwell/aircall-client

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafwell/aircall-client

Aircall API client

latest
npmnpm
Version
0.0.8
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Aircall Client

A simple READ ONLY Aircall client for node.

Installation

Using npm:

$ npm install @leafwell/aircall-client

Using yarn:

$ yarn add @leafwell/aircall-client

Example

import { Aircall } from '@leafwell/aircall-client';

(async function test() {
  try {
    const aircall = new Aircall({
      apiID: 'XXX',
      apiToken: 'YYY',
    });
    const calls = await aircall.calls.list();

    console.log(calls.data);
    console.log(calls.meta);
  } catch (error) {
    if (error.response) {
      // The request was made and the server responded with a status code
      // that falls out of the range of 2xx
      console.log(error.response.data);
      // console.log(error.response.status);
      console.log(error.response.headers);
    } else if (error.request) {
      // The request was made but no response was received
      // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
      // http.ClientRequest in node.js
      console.log(error.request);
    } else {
      // Something happened in setting up the request that triggered an Error
      console.log('Error', error.message);
    }
    console.log(error.config);
  }
})();

Usage

Calls

You can list calls with:

  aircall.calls.list(options?);

You can get a call with:

  aircall.calls.get(id);

Contacts

You can list contacts with:

  aircall.contacts.list(options?);

You can get a contact with:

  aircall.contacts.get(id);

Teams

You can list teams with:

  aircall.teams.list(options?);

You can get a team with:

  aircall.teams.get(id);

Users

You can list users with:

  aircall.users.list(options?);

You can get a user with:

  aircall.users.get(id);

Keywords

aircall

FAQs

Package last updated on 24 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts