0.0
No commit activity in last 3 years
No release in over 3 years
Twilio API wrapper for Outbox, a generic interface for sending notificatons.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.6
~> 12.0.0
~> 3.5.0
~> 0.82.0

Runtime

~> 0.2
 Project Readme

Outbox::Twilio

Gem Version

Twilio SMS client wrapper for Outbox.

Installation

Add this line to your application's Gemfile:

gem 'outbox-twilio'

And then execute:

$ bundle

Or install it yourself as:

$ gem install outbox-twilio

Usage

Configure Outbox to use Outbox::Twilio as the default SMS client:

Outbox::Messages::SMS.default_client(
  :twilio,
  account_sid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  auth_token: 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
  # Supports other Twilio::REST::Client options:
  timeout: 30,
  retry_limit: 1
)

SMS messages will now use the Twilio API for devlivery:

sms = Outbox::Messages::SMS.new(
  from: '+15551115555',
  body: 'Hello World',
  # supports Twilio's non-standard parameters:
  media_url: 'https://www.example.com/hearts.png'
)
sms.deliver('+15552224444')

Contributing

  1. Fork it ( https://github.com/localmed/outbox-twilio/fork )
  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 a new Pull Request