0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Messente.com API wrapper for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 4.1
>= 0

Runtime

~> 0.13
 Project Readme

messente-rails

Non-official Messente.com SMS gateway API wrapper for Rails. Original API documentation: https://messente.com/documentation/setup-and-activation

Gem Version Circle CI Coverage Status Dependency Status Code Climate Inline docs

Installation

Add this line to your application's Gemfile:

gem 'messente-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install messente-rails

Then you should run install generator:

$ rails g messente_rails:install

You should review the generated file and at least insert your credentials.

NB! Don't forget to restart server after configuration.

Usage

Original API documentation: https://messente.com/documentation/setup-and-activation

Idea was to leave original API names intact, so methods and parameters from API are same in gem.

So for example to send SMS with generated initializer it's simply as that:

$ messente = Messente.new
$ messente.send_sms(text: 'Message', to: '+000000000')

OR alternative way

$ Messente.send_sms(text: 'Message', to: '+000000000')

This way you can pass in required and optional parameters and use official documentation as manual.

$ Messente.prices(country: 'GB', format: 'xml')

NB! Be warned about non-ruby like attribute names and pass them as strings. For now there is only one parameter like this 'dlr-url'. Please if you need it send it like that:

$ Messente.send_sms(text: 'Message', to: '+000000000', 'dlr-url' => 'http://example.com/callback')

Contributing

  1. Fork it ( https://github.com/Gedrovits/messente-rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request