aircall

0.1.0 • Public • Published

Aircall

Build Status

An Aircall API for node.

Installation

$ npm install aircall

Example

Create an Aircall instance

var aircall = require('aircall')(apiID, apiToken)

Get company informations

aircall.company(function(err, res){
  console.log(res)
})

List contacts

aircall.contacts.list(function(err, res){
  console.log(res.contacts)
})

List last phone calls by desc order

aircall.calls.list(function(err, res){
  console.log(res)
}, {
  order: 'desc'
})

Get specific user

aircall.users.get(12345, function(err, res){
  console.log(res.user)
})

Tests

  • Add AIRCALL_ID and AIRCALL_TOKEN environment variables corresponding to your account.
  • Make sure you have at least one Call and one User in your account before running the tests.
  • Be aware that the tests will create a dummy Contact (John or Jane Doe) in your account. If anything goes wrong in the Contact block, you may have to manually delete this contact.

This is how you run the tests:

$ npm test

Readme

Keywords

Package Sidebar

Install

npm i aircall

Weekly Downloads

5

Version

0.1.0

License

MIT

Unpacked Size

16.4 kB

Total Files

14

Last publish

Collaborators

  • rayfranco