Ruby API client for pushing objects to Wombat
Add this line to your application's Gemfile:
gem 'wombat-ruby', github: 'wombat/wombat-ruby', require: 'wombat'
And then execute:
$ bundle
Add your Wombat credentials to config/initializers/wombat.rb
:
Wombat.configure do |config|
config.connection_token = "YOUR TOKEN"
config.connection_id = "YOUR CONNECTION ID"
end
You can now send json payload objects to Wombat by calling:
Wombat::Client.push(json_payload)
You can also use the console to debug or test pushing objects.
Start the console like this from your application where you are using wombat-ruby.
bundle exec wombat-console
In the console you will have to setup your credentials, then you can push json objects like this:
Wombat.configure do |config|
config.connection_token = "YOUR TOKEN"
config.connection_id = "YOUR ID"
end
pirate_payload = %{{"pirates": [{"id": "1", "name": "Blackbeard"}]}}
Wombat::Client.push(pirate_payload)
- Fork it ( http://github.com//wombat-ruby/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 new Pull Request
This gem is 100% open source an licensed under the terms of the New BSD License.