Project

mobitex

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby interface to Mobitex's Smscenter API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0.0
>= 0
 Project Readme

Mobitex gem - wrapper to mobitex API

Build Status Dependency Status

How to use it?

Gemfile:

gem 'mobitex'

Code:

Mobitex.configure { delivery_method :http, { :user => 'username', :pass => 'password' } }
Mobitex.deliver(:to => '48123456789', :body => 'Spam bacon sausage and spam')

Enjoy!

More usage examples

First, you must setup delivery method:

Mobitex.configure do
  delivery_method :http, {
    :user => 'username',
    :pass => 'password'
  }
end

Then you can just:

Mobitex.deliver(:to => '48123456789', :body => 'Egg sausage and bacon')

...which really is a shortcut for:

Mobitex::Message.new(:to => '48123456789', :body => 'Egg sausage and bacon')

You can use DSL to create new message:

message = Mobitex::Message.new do
  to   '48123456789'
  body 'Egg, Bacon, Spam, Baked Beans, Spam, Sausage and Spam'
end