Class: Scrapio::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/scrapio/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, base_url: HttpClient::DEFAULT_BASE_URL, timeout: HttpClient::DEFAULT_TIMEOUT) ⇒ Client

Returns a new instance of Client.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/scrapio/client.rb', line 15

def initialize(api_key, base_url: HttpClient::DEFAULT_BASE_URL, timeout: HttpClient::DEFAULT_TIMEOUT)
  http = HttpClient.new(api_key, base_url: base_url, timeout: timeout)

  @fetch    = Resources::Fetch.new(http)
  @google   = Resources::Google.new(http)
  @amazon   = Resources::Amazon.new(http)
  @walmart  = Resources::Walmart.new(http)
  @youtube  = Resources::YouTube.new(http)
  @jobs     = Resources::Jobs.new(http)
  @crawl    = Resources::Crawl.new(http)
  @interact = Resources::Interact.new(http)
end

Instance Attribute Details

#amazonObject (readonly)

Returns the value of attribute amazon.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def amazon
  @amazon
end

#crawlObject (readonly)

Returns the value of attribute crawl.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def crawl
  @crawl
end

#fetchObject (readonly)

Returns the value of attribute fetch.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def fetch
  @fetch
end

#googleObject (readonly)

Returns the value of attribute google.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def google
  @google
end

#interactObject (readonly)

Returns the value of attribute interact.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def interact
  @interact
end

#jobsObject (readonly)

Returns the value of attribute jobs.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def jobs
  @jobs
end

#walmartObject (readonly)

Returns the value of attribute walmart.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def walmart
  @walmart
end

#youtubeObject (readonly)

Returns the value of attribute youtube.



13
14
15
# File 'lib/scrapio/client.rb', line 13

def youtube
  @youtube
end