Ruby API client for objects to Cenithub
Add this line to your application's Gemfile:
gem 'cenithub-ruby', github: 'asnioby/cenithub-client', require: 'cenithub'
And then execute:
$ bundle
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)
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)
- Fork it ( http://github.com//Cenithub-client/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.