Simple Ruby wrapper for the Kapost API version 1
Add this line to your application's Gemfile:
gem 'kapost'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install kapost
Common usage:
require 'kapost'
Kapost.configure do |config|
config.api_token = ENV['KAPOST_API_KEY']
config.instance = ENV['KAPOST_INSTANCE']
end
client = Kapost::Client.new
Alternatively:
require 'kapost'
client = Kapost::Client.new(:api_token => ENV['KAPOST_API_KEY'], :instance => ENV['KAPOST_INSTANCE'])
client.show_content(:id => 'the_dude_abides_1')
# => {...}
params = { ... }
client.create_content(params)
# => {...}
params = { ... }
client.update_content(params)
# => {...}
client.delete_content(:id => 'out_of_your_element_1')
# => {...}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes including rspec tests (
git commit -am 'Add some feature'
) - Note: Please do not change the version number - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request