Class: DiffbotSimple::V2::Bulk

Inherits:
Crawl
  • Object
show all
Defined in:
lib/diffbot_simple/v2/bulk.rb

Instance Attribute Summary

Attributes inherited from Crawl

#name, #parameters

Instance Method Summary collapse

Methods inherited from Crawl

#apiUrl=, #delete!, #method_missing, #pause, #refresh, #restart, #results, #unpause, #update

Constructor Details

#initialize(bulk_api: nil, name: nil, init: {}, **parameters) ⇒ Bulk

Returns a new instance of Bulk.



3
4
5
# File 'lib/diffbot_simple/v2/bulk.rb', line 3

def initialize bulk_api: nil, name: nil, init: {}, **parameters
	super parameters.merge(name: name, crawlbot_api: bulk_api, init: init)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class DiffbotSimple::V2::Crawl

Instance Method Details

#process(urls_to_process) ⇒ Object



6
7
8
9
# File 'lib/diffbot_simple/v2/bulk.rb', line 6

def process urls_to_process
	urls_to_process = [urls_to_process] unless urls_to_process.respond_to? :join
	send_to_api urls: urls_to_process.join(" ")
end