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.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/scrapio/client.rb', line 21

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)
  @fast_search = Resources::FastSearch.new(http)
  @search      = Resources::Search.new(http)
  @map         = Resources::Map.new(http)
  @booking     = Resources::Booking.new(http)
  @agoda       = Resources::Agoda.new(http)
end

Instance Attribute Details

#agodaObject (readonly)

Returns the value of attribute agoda.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def agoda
  @agoda
end

#amazonObject (readonly)

Returns the value of attribute amazon.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def amazon
  @amazon
end

#bookingObject (readonly)

Returns the value of attribute booking.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def booking
  @booking
end

#crawlObject (readonly)

Returns the value of attribute crawl.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def crawl
  @crawl
end

#fast_searchObject (readonly)

Returns the value of attribute fast_search.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def fast_search
  @fast_search
end

#fetchObject (readonly)

Returns the value of attribute fetch.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def fetch
  @fetch
end

#googleObject (readonly)

Returns the value of attribute google.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def google
  @google
end

#interactObject (readonly)

Returns the value of attribute interact.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def interact
  @interact
end

#jobsObject (readonly)

Returns the value of attribute jobs.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def jobs
  @jobs
end

#mapObject (readonly)

Returns the value of attribute map.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def map
  @map
end

#searchObject (readonly)

Returns the value of attribute search.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def search
  @search
end

#walmartObject (readonly)

Returns the value of attribute walmart.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def walmart
  @walmart
end

#youtubeObject (readonly)

Returns the value of attribute youtube.



18
19
20
# File 'lib/scrapio/client.rb', line 18

def youtube
  @youtube
end