Ruby gem that wraps the Onsip Admin API
http://developer.onsip.com/admin-api/
Add this line to your application's Gemfile:
gem 'onsip'
And then execute:
$ bundle
Or install it yourself as:
$ gem install onsip
The Onsip for Ruby gem is currently in development and many things are missing such as proper error handling. It is not recommended to use this gem at the current time but and additions to the gem would be appreciated.
Planned Releases
v0.0.1 (July 2014) - Implement the Session actions and the CdrBrowse action
v0.0.2 (July 2014)- Implement proper error handling for http responses
v0.0.3 - Implement the remaining get requests
Releases
none yet :)
http://developer.onsip.com/admin-api/Authentication/#sessioncreate
Before making any API calls you need to authenticate
Session returns a boolean indicating whether the session was made successfully. Because the session is a singleton you don't need to store any session or pass the session id to any further calls.
Onsip::Session.instance.authenticate("username", "password")
Onsip::Session.instance.destroy
call_data_records = Onsip::CallDataRecord.where(:session_id => session_id,
:account_id => account_id,
:start_at => start_date_time,
:end_at => end_date_time,
:order_by => :date_time,
:limit => )
call_data_record.count = Onsip::CallDataRecord.count(:session_id => session_id,
:account_id => account_id,
:start_at => start_date_time,
:end_at => end_date_time
)
- Fork it ( https://github.com/[my-github-username]/onsip/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