Nexmo::Voice
A Ruby wrapper for the Nexmo Voice API.
Installation
Add this line to your application's Gemfile:
gem 'nexmo-voice'
And then execute:
$ bundle
Or install it yourself as:
$ gem install nexmo-voice
Usage
# Initialize your client
client = Nexmo::Voice::Client.new 'your_key', 'your_secret'
# or initialize with read_timeout and open_timeout(default: 10 seconds)
client = Nexmo::Voice::Client.new 'your_key', 'your_secret', read_timeout: 2, open_timeout: 2
# Make a tts call with minimum options
options = {
to: 'recipient_number',
text: 'Hello from gem.'
}
client.ttses.create options
Contributing
- Fork it ( https://github.com/fahchen/nexmo-voice/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