0.0
No commit activity in last 3 years
No release in over 3 years
Ruby library for sending SMS messages using the Kapow SMS gateway service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Kapow

Build Status Code Climate

Ruby library for Kapow SMS gateway service

Installation:

Include the gem in your Gemfile

  gem 'kapow'

Usage:

To use this library you first need to sign up for an account at www.kapow.com.

The library wraps the HTTP POST service provided as this has the advantages of speed and an immediate response message.

# Create a new sms
msg = Kapow::SMS.new('username', 'password')
msg.deliver('mobile_no', 'sms')

All options supported by Kapow can be passed into the deliver method as a hash

# Send sms as a flash
msg.deliver('mobile_no', 'sms', :flash => true)

# Send sms with from_id (if enabled in account)
msg.deliver('mobile_no', 'sms', :from_id => 'from_id')

# Send sms up to 1377 characters long
msg.deliver('mobile_no', 'sms', :long_sms => true)

Responses provided by the Kapow SMS Gateway are:

Name Description
OK Message has been accepted for delivery.
USERPASS Invalid username or password.
NOCREDIT Account has no credits or credit limit has been reached.
ERROR Any other error has occurred.

The amount of remaining credit is included with the 'OK' response from the gateway. This is available as:

Kapow::Credit #=> 325