Diffbot.rb
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 everything through the client
client = Diffbot::Client.new
client.article "www.somedomain.com/example-url"
or just the modules that you actually need
article = Diffbot::Article.new("www.mrt.com/baracus-url")
article.title #=> 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