Warning: This gem is under heavy development! Check TODO for the overview of the current state.
Official Ruby gem for the Inline Manual API with Rails integration.
Tested only with Ruby 1.9.2 and Rails 3.2.x
- Fetch list of the site topics (tours).
- Fetch content of the topic.
Add this line to your application's Gemfile:
gem 'inlinemanual'
And then execute:
$ bundle
Or install it yourself as:
$ gem install inlinemanual
Example usage:
require 'inlinemanual'
InlineManual.site_api_key = 'YOUR_SITE_API_KEY'
begin
topics = InlineManual::SiteTopic::fetch_all
topics.each do |t|
puts InlineManual::SiteTopic::fetch(t[:id])
end
rescue InlineManual::InlineManualError => e
puts e.message
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Make sure that your changes pass the tests (
bundle exec rake test
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
For testing purposes you can also change the base path of the API and disable SSL verification if needed:
InlineManual.api_base = 'http://localhost:3000/api'
InlineManual.verify_ssl_certs = false
Developed with love by fine folks of Inline Manual
Some parts of the code (especially the API exception handling) were inspired by the Stripe Ruby bindings.
The MIT License
Copyright © 2013- Inline Manual (https://inlinemanual.com)