Zadarma API
Installation
Add this line to your application's Gemfile:
gem 'zadarma'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zadarma
Usage
Zadarma.api_key = "YOUR_API_KEY"
Zadarma.api_secret = "YOUR_API_SECRET"
Zadarma.log_requests = false # default
Zadarma::Client.balance
Available methods:
balance- user balanceprice(number)- call pricecallback(from, to, params = {})- request callbacksip- list user’s SIP-numbersset_sip_caller(id, number)- change of CallerIDredirection(params = {})- get call forwarding status on SIP-numbersset_redirect(id, params)- enable/disable sip forwardingpbx_internal- list PBX internal numberspbx_record(id, status, params = {})- toggle call recordingsend_sms(number, message, params = {})- send smsstatistics(date_start, date_end, params = {})- get statspbx_statistics(date_start, date_end)- get PBX stats
Contributing
- Fork it ( https://github.com/zhekanax/zadarma-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request