Class: DiffbotSimple::V2::Analyze
- Inherits:
-
Object
- Object
- DiffbotSimple::V2::Analyze
- Includes:
- ApiHelper
- Defined in:
- lib/diffbot_simple/v2/analyze.rb
Overview
Complies to www.diffbot.com/dev/docs/analyze
Instance Method Summary collapse
- #post_initialize ⇒ Object
- #single_analysis(url: nil, **options) ⇒ Object (also: #single_analyze)
- #to_crawl_api_url ⇒ Object
Methods included from ApiHelper
Instance Method Details
#post_initialize ⇒ Object
5 6 7 |
# File 'lib/diffbot_simple/v2/analyze.rb', line 5 def post_initialize @api = :analyze end |
#single_analysis(url: nil, **options) ⇒ Object Also known as: single_analyze
12 13 14 15 |
# File 'lib/diffbot_simple/v2/analyze.rb', line 12 def single_analysis url: nil, ** raise ArgumentError.new "Must pass an url to fetch" unless url execute_call .merge(url: url) end |
#to_crawl_api_url ⇒ Object
8 9 10 11 |
# File 'lib/diffbot_simple/v2/analyze.rb', line 8 def to_crawl_api_url default = super "#{default}?mode=auto" end |