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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request