Class: Diffbot::Client

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/diffbot_api/client.rb

Overview

Client fot the Diffbot API

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



11
12
13
# File 'lib/diffbot_api/client.rb', line 11

def initialize
  validate_diffbot_token!
end

Instance Method Details

#article(url) ⇒ Diffbot::Article

Instantiate an Article from a URL

Examples:

Fetch an article

client = Diffbot::Client.new
client.article "www.example.com/some-url"

Parameters:

  • url (String)

    Specify the target article url

Returns:

See Also:



23
24
25
# File 'lib/diffbot_api/client.rb', line 23

def article(url)
  Diffbot::Article.new(url)
end