public
Rubygem
Description: Ruby wrapper for sending SMS messages via the mxtelecom gateway's HTTP API.
Clone URL: git://github.com/coderifous/mxtelecom_api.git
name age message
file .gitignore Tue Jun 24 08:10:21 -0700 2008 Added .gitignore to ignore pkg directory [coderifous]
file History.txt Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
file License.txt Tue Jul 15 05:52:00 -0700 2008 Fixed version info [coderifous]
file Manifest.txt Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
file PostInstall.txt Tue Jul 15 05:52:00 -0700 2008 Fixed version info [coderifous]
file README.txt Wed Jun 18 11:51:24 -0700 2008 typo fix [pcg79]
file Rakefile Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
directory config/ Tue Jul 15 05:52:00 -0700 2008 Fixed version info [coderifous]
directory lib/ Mon Jul 28 14:42:43 -0700 2008 Incremented version number. [coderifous]
file mxtelecom_api.gemspec Mon Jul 28 14:42:43 -0700 2008 Incremented version number. [coderifous]
directory script/ Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
file setup.rb Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
directory tasks/ Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
directory test/ Mon Jul 28 14:41:18 -0700 2008 [bug fix] Changed URI.escape to CGI.escape [coderifous]
directory website/ Wed Jun 18 10:34:18 -0700 2008 first commit [coderifous]
README.txt
= mxtelecom_api

== DESCRIPTION:

Simple API wrapper for sending SMS' via the mxtelecom gateway.

== SYNOPSIS:

  class User < ActiveRecord::Base
    # you include it in a class
    include mxtelecom_api
    
    # then you can configure it with your mxtelecom info
    # note, this is optional, you can always just provide this in an options
    # hash to the deliver_sms method.
    #             user name,    password,    and short code for smsfrom param
    mxtelecom_api 'bobbymcgee', 'password1', '12345'
    
    def send_current_location_sms
      # and then you can use the deliver_sms class method
      # it takes a phone number, and then a message.  That's it.
      User.deliver_sms(mobile_phone_number, 'You are there!  There you are!')

      # or if you didn't use the config declaration, or you want to override
      User.deliver_sms(mobile_phone_number, 'You are there!  There you are!', :user => "foobar", :pass => "barbaz")
    end
  end

  # see, here's what it might look like if you used it in a rails project:
  user = User.find(:first)
  user.send_current_location_sms

== INSTALL:

* sudo gem install mxtelecom_api

== 

== LICENSE:

(The MIT License)

Copyright (c) 2008 Jim Garvin

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.