Ruby Gem for sending SMS through the Mediaburst API
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Mediaburst API Gem

The Mediaburst Gem is the fastest way of integrating the Mediaburst API into your own ruby applications.


Install the gem as normal:

sudo gem install mediaburst

The Mediaburst gem also relies on Nokogiri for XML parsing.


Create an instance of the Mediaburst client:

client ='username', 'password')

Send an SMS:

response = client.send_message('441234567890', 'My test message')

Send a message to several numbers:

response = client.send_message(['441234567890', '441234567891', '441234567892'], 'My test message')

Send a long message to several numbers using the concat option:

options = {
  :concat => 3

response = client.send_message(['441234567890', '441234567891', '441234567892', '44'], SOME_LONG_MESSAGE, options)

Send a long message with a custom from address from option:

options = {
  :concat => 3,
  :from => 'RubyDemo'

response = client.send_message(['441234567890', '441234567891', '441234567892', '44'], SOME_LONG_MESSAGE, options)

Check the response for errors:

y response
=> ---
   "441234567890": true
   "441234567891": true
   "441234567892": true
   "44": 10

On error, the value of the key referenced by the number will equal the error code returned from Mediaburst.


The source for the gem is hosted on GitHub for you to peruse, fork and contribute to.

To enable us to easily manage your contributions, please submit your pull requests as single commits that include tests to show your changes working as normal. Please do not change the version number - we'll take care of that as we merge your changes.


Copyright © 2011 Matthew Hall, released under the ISC license. All trademarks and IP remain the property of their respective owners.