Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Diffbot, a ruby library to access APIs provided by diffbot.com

License

Notifications You must be signed in to change notification settings

harish86/diffbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffbot

Diffbot, a ruby library to access APIs provided by diffbot.com

Requirements

Two ruby gems are required: 'open-uri' and 'json'

Installation

  • Download this library and place it in a directory which is accessible

  • Require the library

require 'diffbot/base'
  • Setup the configuration and make sure it is loaded when the application is loaded
Diffbot::Base.configure do |config|
  config.token = '<developer-token-provided-by-diffbot.com>'
end

Usage

Diffbot::Article.extract(url, options = {})

where,

Example:

article_data = Diffbot::Article.extract('http://www.wired.co.uk/news/archive/2012-06/01/diffbot', fields: 'meta, icon')

The json response from the Article API is parsed using the json library and the resultant hash is returned.

NOTE: This library currently includes methods to access only the article API provided by diffbot.com. Access to other APIs are yet to be implemented.

-- Copyright (c) 2014 [Harish Premkumar].

About

Diffbot, a ruby library to access APIs provided by diffbot.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages