Skip to content

cornet/dialogue-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dialogue-toolkit

About

A ruby gem to send SMS messages through the Dialogue SMS Toolkit API: http://www.dialogue.net/sms_toolkit/

Install

git clone git://github.com/cornet/dialogue-toolkit.git
cd dialogue-toolkit
rake install

Example Usage

#!/usr/bin/env ruby

require 'rubygems'
require 'dialogue-toolkit'

sms = Dialogue::Toolkit::Sms.new('username','password')

params = {
  :recipients => '447123456789',    # Mobile number to send to
  :message    => 'hello world',     # Message content
  :reply_path => 'foo@example.com', # Where to send delivery receipt to
}

p sms.send(params)

Handling delivery receipts using Sinatra

post '/dr' do
  resp = Dialogue::Toolkit::Sms::Dr.new(request.body.read)
  if resp.delivery_report.eql? '00'
	"Message Delivered"
  else
    "Message Failed"
   end
end

References

Contribute

If you would like to contribute to dialogue-toolkit then fork the project, implement your feature/plugin on a new branch and send a pull request.

About

Ruby Gem to send SMS via the dialogue toolkit API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages