This is my Blog.

It's full of opinions on a wide range of stuff.

Ruby SMS gateway client for sign-up.to

Well, I finally got round to getting my own RubyForge project! Its been a while coming now, but I decided to release some of the work ive done using the (SignUpTo)[http://sign-up.to] SMS gateway as a gem :)

Its still very early stages, as i only needed something rough for the project I was working on, however i put it out anyway - its rough but it does work I assure you! lol

You can check the project page at (signupto.rubyforge.org)[http://signupto.rubyforge.org] and download the source files (here)[http://rubyforge.org/frs/?group_id=4542].

Otherwise, if you wanna install via gems, just do the usual:

sudo gem install signupto

So how do I use it?

For this example, we'll use rails, at thats probally where people might use it most often... In your boot.rb do

<code>gem 'signupto'</code>

Then require the files in your enviroment.rb

<code>require 'net/sms/signupto'</code>

That will then let you use the classes anywhere in your app :) such as

<code>account = Net::SMS::SignupTo::Account.new(‘YOUR ACCOUNT HASH', ‘CUSTOMER')
message = Net::SMS::SignupTo::Message.new(RECIPIENT_NUMBER,
'NAME OF SENDER (max 12 chars)', 
‘BODY OF MESSAGE, NON-URI encoded')</code>






<code>send = Net::SMS::SignupTo::Send.new(account, message)</code>

The SMS's should then just fly out the door! Apologies as I know this is a very rushed first post about this, but I have places to go and people to see ;) I'll be bolstering the unit tests and examples soon. Stay tuned people!!

blog comments powered by Disqus