https://github.com/tompave/clickatell_gw
https://github.com/tompave/clickatell_gw
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tompave/clickatell_gw
- Owner: tompave
- License: mit
- Created: 2014-02-11T10:35:50.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-11T18:23:23.000Z (over 12 years ago)
- Last Synced: 2025-02-01T08:41:47.795Z (over 1 year ago)
- Language: Ruby
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
#clickatell_gw
Wrapper for the Clickatell API
## Installation
Add this line to your application's Gemfile:
gem 'clickatell_gw'
And then execute:
$ bundle
Or install it yourself as:
$ gem install clickatell_gw
##Configuration
Anywhere before creating a `ClickatellGW::API` object. In Rails, this can go in an initializer.
```ruby
ClickatellGW.setup do |config|
config.api_id = ""
config.user = ""
config.password = ""
config.sender = ""
end
```
##Use
```ruby
require 'clickatell_gw'
api = ClickatellGW::API.new
api.send_text body: "Hello World!", number: "44123456789"
# => sent message id
```
##Caveats
The Cliclatell API can take up to 1-2 seconds to return a response.
If this is an issue (e.g. during an HTTP request), consider using a background worker.
##ToDo
* Send messages on a secondary thread.
* Add logging
## 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