Skip to content

tjeden/smscenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby interface to Mobitex's Smscenter API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages