Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby translation of the API to call the AfricasTalking web service
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
spec
.gitignore
AfricasTalkingGateway.rb
README

README

Ruby API for connecting to AfricasTalking Gateway
=================================================
Based on:
    1. https://api.africastalking.com/tutorials/index/phpget
    2. https://api.africastalking.com/tutorials/index/phppost
    3. https://api.africastalking.com/tutorials/index/viewphpsource

Requires the following gems:
    1. curb

Sending SMS
===========

valid_api = AfricasTalkingGateway.new(valid_username, valid_api_key)
status = valid_api.send_message("+2547771234567,+2547771234568,+2547771234569", "Hello world")

Receiving SMS
=============
valid_api = AfricasTalkingGateway.new(valid_username, valid_api_key)
messages = valid_api.fetch_messages(0)

Look at the spec file for more examples of how to read the responses. You need to include your valid username and
api key for the tests to run successfuly.
Something went wrong with that request. Please try again.