Code Monkey home page Code Monkey logo

aircall's Introduction

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

aircall's People

Contributors

pbechu avatar rayfranco avatar tdebarochez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aircall's Issues

Half of routes doesn't works

Hello, you need to remove for each routes the default fields :

    from: null, // Set a minimal creation date for objects	(non
    to: null  // Set a maximal creation date for objects

But you can keep the others default fields :

    page: 1, // Pagination for list of objects
    per_page: 50, // Number of objects fetched per request
    order: 'asc', // Reorder entries per creation date, asc or desc

Because Aircall has changed their apis and null (is string type and) is considered like a real field.
Sorry for now I can't published a PR so can you do it ? It will be awesome !

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.