No commit activity in last 3 years
No release in over 3 years
A little bit of code to make PennySMS XML requests. But not JSON requests right now.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.9

Runtime

>= 2.1.1
>= 1.1.3
 Project Readme

PennySMS Muncher

A little bit of code to make PennySMS XML requests.


>> require 'penny_sms'
>> include PennySMSMuncher
>> req = PennySMS::XMLRequest.new(penny_sms_api_key, from_email, phone_number, body)
...
>> response = req.send_sms
...
>> response.success?
=> true
>> response.status
=> "OK"
>> req = PennySMS::XMLRequest.new(penny_sms_api_key, from_email, '6175551234', body)
...
>> response = req.send_sms # PennySMSMuncher::PennySMS::Response object
...
>> response.status
=> error"
>> response.success?
=> false
>> response.fault_code
=> "500"
>> response.fault_name
=> "Error: unsupported cell number"
>> response.raw # Net::HTTPOK object
=> #<Net::HTTPOK 200 OK  readbody=true>
>> response.raw.body # string
=> "<?xml version="1.0" ?><methodResponse><fault><value><struct><member><name>faultCode</name><value><i4>500</i4></value></member><member><name>faultString</name><value><string>Error: unsupported cell number</string></value></member></struct></value></fault></methodResponse>\n"
>> response.data   # LibXML::XML::Document object

Here is the minimalist PennySMS doc: https://www.pennysms.com/docs_xml

Note on Patches/Pull Requests

  • Go ahead and make the JSON work.
  • And feel free to chat me up.

Copyright

Copyright © 2010 chris A. See LICENSE for details.