Project

sendout

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A ruby gem to connect your application with SendOut API to send text messages(Internacional) from Angola.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0

Runtime

~> 0.13.7
~> 1.8
 Project Readme

Sendout

A ruby gem createb by SmartTechys for the SendOut API that allows your application to send text messages (Angolan and International).

ATTENTION

  • API Version 1 - Gem sendout v0.1.1
  • API Version 2 - Gem sendout v0.1.2

Installation

Add this line to your application's Gemfile:

gem 'sendout'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sendout

Setup

  • Make sure you've registed at SendOut and have produced your token(api_token) and id(your registered phone number).
  • Setup your environments variables
SO_API_ID=244911222333
SO_API_TOKEN=your_api_token_obtained_from_control_panel_at_sendout

Usage

At the moment there's only two sendOut endpoints in production:

  • Check your balance
  • Send one or bulk message

Check your balance

Sendout.check_balance

# It will return a json

{
  "cliente": "2449XXXXXXXX"
   "saldo": "512"
   "enviadas": "203"
   "contactos": "2"
   "campanhas": "1"
}

Send one or bulk message - Production Environment

Sendout.send_sms(num, false, msg)

# The num has to be an array the debug a boolean, and the msg an string. This method will return an array of one or more JSON objects.

Response:

[
    {
        "id":"0800000018E1C4DA",
        "de":"2449XXXXXXX5",
        "para":"2449XXXXXXX0",
        "remetente":"SENDOUT",
        "caracteres":"24",
        "quantidade":"1",
        "data":"07-01-2017 18:59:37",
        "rede":"00000",
        "enviado":true,
        "estado":"Entregue"
    }
]

Send one or bulk message - Test Environment

You need to add a boolean value true to send as test; if false will send it to production

Sendout.send_sms(num, true, msg)

# The num has to be an array and the msg an string. This method will return an array of one or more JSON objects

Help and Docs

Development

  • You can fork it
  • bundle
  • bundle rake exec
  • Make your feature addition or fix a bug
  • Do not mess with the rakefile version or history (do not submit version bump PLEASE or put it in a different commit so we can ignore it when pull)
  • Send us the pull request

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/smaziano/sendout. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.