Project

simplesol

0.0
No commit activity in last 3 years
No release in over 3 years
SimpleSol service client gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Simplesol

Client gem for sms sending through http://simplesol.ru/.

Installation

Add this line to your application's Gemfile:

gem 'simplesol'

And then execute:

$ bundle

Or install it yourself as:

$ gem install simplesol

Usage

Configure

Instantiate Client class with some config:

  @client = Simplesol::Client.new do |c|
    c.login    = '<your username>'
    c.api_key  = '<your api key>'
  end

or configure client later:

  @client = Simplesol::Client.new
  @client.configure do |c|
    c.login    = '<your username>'
    c.api_key  = '<your api key>'
  end

or reset clients settings to defaults via:

  @client.reset

Available commands

  • Sending message:

      @client.send_message(['mobile1', 'mobile2'], 'Привет, как дела', { :sender => 'santa' })
  • Get sms message status:

      @client.message_status(['message id'])
  • Get cost of message:

      @client.message_price(['mobile1', 'mobile2'], 'Привет, как дела')
  • Check account balance:

      @client.balance

For futher reading and testing please look at spec/simplesol_spec.rb

Tested with ruby-1.8.7-p370 and ruby-1.9.3-p327.

Contributing

  1. Fork it
  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 new Pull Request