Project

smsgh_sms

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
This is a ruby wrapper that abstracts the SMSGH's SMS API. This gem has extra garnishing to make smsing via Ruby more tasteful and less painful.'
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

SmsghSms

This is a ruby wrapper that abstracts the SMSGH's SMS API. This gem has extra garnishing to make smsing via Ruby more tasteful and less painful.

Installation

Add this line to your application's Gemfile:

gem 'smsgh_sms'

And then execute:

$ bundle

Or install it yourself as:

$ gem install smsgh_sms

Usage

Setup your SMSGH API username and password

If you are using the old API (V2) then

SmsghSms.api_username = "YOUR_USERNAME"
SmsghSms.api_password = "YOUR_PASSWORD"

If you are using the new API (V3) then

SmsghSms.api_client_id = "YOUR_CLIENT_ID"
SmsghSms.api_client_secret = "YOUR_CLIENT_SECRET"

Optionally set global Sender ID

SmsghSms.api_senderid = "YOUR_SENDERID"

Sending an SMS Message

SmsghSms.push(:to => 'PHONE-NUMBER', :msg => "Your SMS Message goes here")

How to override the global SENDER ID config

SmsghSms.push(:to => 'PHONE-NUMBER', :msg => "Your SMS Message goes here", :from => "SENDERID")

Sample Results Returned

{:status=>200, :notice=>"OK: 62357215"}

Any returned status code other than 200 is a failed response.

About SMSGH

SMSGH is the premier messaging company in Ghana. Find out more about them at http://smsgh.com

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request