/aircall

Aircall library in Ruby

Primary LanguageRuby

Aircall

License Gem

A Ruby gem for Aircall. Only some methods are presents for the moment.

Installation

Add this line to your application's Gemfile:

gem 'aircall'

And then execute:

$ bundle

Or install it yourself as:

$ gem install aircall

Usage

Init

Create new Aircall connection like this:

require 'aircall'
aircall = Aircall.new({id: [AIRCALL_ID], token: [AIRCALL_TOKEN]})

Or like this:

require 'aircall'
aircall = Aircall.new
aircall.id = [AIRCALL_ID]
aircall.token = [AIRCALL_TOKEN]

Methods

Examples

aircall.contacts.get_by_email("youremail@gmail.com")
aircall.contacts.get_by_phone_number("+33612345678", per_page:1, page:3, order: "desc", order_by: "updated_at")
aircall.calls.get_all(per_page: 2, from: 1495542462, to: 1514035662)

Development

Build

gem build aircall.gemspec

Local installation

gem install ./aircall-[version].gem

Tests

Create .env file from .env.example. Complete with your variables.

Run test with rake test.

Deployment

Deployment from Github

bundle exec rake release

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request