Cellcom
Cellcom is a ruby wrapper around the Cellcom HTTP API Spec.
NOTE
This is a minimal implementation that will just send the sms. In the futur, I(or you) will add the ability to register a callback url for sms status and credit lookup.
Installation
Add this line to your application's Gemfile:
gem 'cellcom'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cellcom
Usage
Cellcom::Configure do |config|
config.clid = 12345
config.gwid = 123
config.pwd = "256ea978c8f8752eaf87e7a"
end
Cellcom::Sms.new(m: 'my message', to: '32496233133', sid: '3228886991').deliver
If for some reason you want to send from multiple accounts:
credentials_hash = {
clid: 12345,
gwid: 123,
pwd : "256ea978c8f8752eaf87e7a"
}
Cellcom::Client.new(credentials_hash).deliver(m: 'my message', to: '32496233133', sid: '3228886991')
# or
sms = Cellcom::Sms.new(m: 'my message', to: '32496233133', sid: '3228886991')
client = Cellcom::Client.new(clid: 12345, gwid: 123, pwd : "256ea978c8f8752eaf87e7a")
sms.deliver(client)
Contributing
- Fork it ( https://github.com/gregory/cellcom/fork )
- 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 a new Pull Request