Skip to content

macarci/cenit_ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cenithub::Client

Ruby API client for objects to Cenithub

Installation

Add this line to your application's Gemfile:

gem 'cenithub-ruby', github: 'asnioby/cenithub-client', require: 'cenithub'

And then execute:

$ bundle

Usage

Add your Cenithub credentials to config/initializers/cenithub.rb:

Cenithub.configure do |config|
  config.connection_token = "YOUR TOKEN"
  config.connection_id = "YOUR CONNECTION ID"
end

You can now send json payload objects to Cenithub by calling:

Cenithub::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 Cenithub-ruby.

bundle exec cenithub-console

In the console you will have to setup your credentials, then you can push json objects like this:

Cenithub.configure do |config|
  config.connection_token = "YOUR TOKEN"
  config.connection_id = "YOUR ID"
end

pirate_payload = %{{"pirates": [{"id": "1", "name": "Blackbeard"}]}}

Cenithub::Client.push(pirate_payload)

Contributing

  1. Fork it ( http://github.com//Cenithub-client/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

Cenithub Logo

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

About

Cenithub API client for Ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages