Ruby wraper for the diffbot.com API, follows Ruby conventions and idioms.
Check out the code documentation here.
Installation
Add this line to your application's Gemfile:
gem 'diffbot_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install diffbot_api
Usage
You can provide your authentication token globally
Diffbot.configure do |c|
c.token = ENV['DIFFBOT_TOKEN']
end
The API is modular, you can access access all resources through the client instance
client = Diffbot::Client.new
client.article "www.somedomain.com/example-url"
or just the module-level resources that you actually need
article = Diffbot::Article.new("www.mrt.com/the-a-team")
article.title # => "The A-Team"
article.author # => "Mr. T"
Status
This is very early stage, here are the endpoints implemented so far:
- Article (in progress)
- FrontPage (pending)
- Product (pending)
- Image (pending)
- Classifier (pending)
Contributing
- Fork it ( http://github.com/orendon/diffbot.rb/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