= TatangoSMS

* http://tatango.com/developers

== Description

The Tatango Messaging Gateway provides a way for you to utilize our streamlined messaging pipeline to send out SMS messages to your users. SMS messages are advertisement-supported, so we can provide this service at zero cost to the developer.

== Sign-up

In order to use the Tatango SMS Gateway, you will need to sign up for a gateway key. You can sign up at http://tatango.com/developers/gateway.

== Install

gem install tatango-sms

== Requirements

TatangoSMS::MO requires +mongrel+ and +activesupport+. Neither are listed as a gem dependency because TatangoSMS::MT does not require them.

TatangoSMS::MT requires <tt>digest/md5</tt>, <tt>net/http</tt>, and +uri+ from ruby core.

== Documentation

TatangoSMS::MT:: for mobile-terminated support
TatangoSMS::MO:: for mobile-oriented support

more documentation can be found at: http://tatango.com/developers/gateway/docs

== Support

Have questions? You can usually find the Tatango engineering team at ##tatango on Freenode.

More information here: http://tatango.com/developers/connect

== Example

require 'rubygems'
require 'tatango_sms/mt'
require 'tatango_sms/mo'

# setup a mobile terminated object with our Tatango SMS Gateway key and password
mt = TatangoSMS::MT.new('key', 'password')

# run a server on port 3333 to accept incoming messages from Tatango
server = TatangoSMS:MO.server('0.0.0.0', '3333')
TatangoSMS::MO.receive(server, '/') do |phone_number, content|
# send the reversed message back
mt.send(phone_number, content.reverse)
end

server.run.join