0.0
No commit activity in last 3 years
No release in over 3 years
You can specify the data to access your Kazoo server and use the Kazoo API using the methods of this sdk.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0

Runtime

 Project Readme

Kazoo::Ruby::Sdk

SDK for Kazoo API

Installation

Add this line to your application's Gemfile:

gem 'kazoo-ruby-sdk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kazoo-ruby-sdk

Config

Create config/initializers/kazoo_ruby_sdk.rb

KazooRubySdk.configure do |config|
  config.auth_url = 'http://yourserver.com:8000/v1'
  config.realm = 'your-realm'
  config.username = 'your-username'
  config.password = 'your-password'
end

Usage

devices = KazooRubySdk::Devices.new.list.data        
device_id = devices[0].id    
device = KazooRubySdk::Devices.get(device_id)

By default each method of this SDK will be use the configuration from initializer. Also you can explicitly specify a configuration before calling any method.

configuration = {
  auth_url: 'http://your_other_server.com:8000/v1',
  realm: 'your-other-realm',
  username: 'your-other-username',
  password: 'your-other-password'
}
devices = KazooRubySdk::Devices.new(configuration).list.data        

List of methods

Callflows

  • list()
  • get(id)
  • create(attributes)
  • update(id, attributes)
  • destroy(id)

CDRs

  • range(from, to)
  • get(cdr_id)
  • get_all_by_user(user_id)

Devices

  • list()
  • get(device_id)
  • get_statuses
  • create(attributes)
  • update(id, attributes)
  • destroy(id)

Phone Numbers

  • create(phone_number, account_id, data)
  • butch_create(phone_numbers, account_id)
  • destroy(phone_number, account_id)

Users

  • list()
  • get(id)
  • create(attributes)
  • update(id, attributes)
  • destroy(id)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pohodnya/kazoo-ruby-sdk.

License

The gem is available as open source under the terms of the MIT License.