Skip to content

jsqu99/wombat-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wombat::Ruby

Ruby API client for pushing objects to Wombat

Installation

Add this line to your application's Gemfile:

gem 'wombat-ruby', github: 'wombat/wombat-ruby', require: 'wombat'

And then execute:

$ bundle

Usage

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)

Use console

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)

Contributing

  1. Fork it ( http://github.com//wombat-ruby/fork )
  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

Wombat Logo

This gem is 100% open source an licensed under the terms of the New BSD License.

Releases

No releases published

Packages

No packages published

Languages