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.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/scrapio/client.rb', line 32

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)
  @airbnb          = Resources::Airbnb.new(http)
  @autotrader      = Resources::Autotrader.new(http)
  @chatgpt         = Resources::Chatgpt.new(http)
  @perplexity      = Resources::Perplexity.new(http)
  @gemini          = Resources::Gemini.new(http)
  @bing            = Resources::Bing.new(http)
  @reddit          = Resources::Reddit.new(http)
  @tiktok          = Resources::TikTok.new(http)
  @target          = Resources::Target.new(http)
  @apple_app_store = Resources::AppleAppStore.new(http)
end

Instance Attribute Details

#agodaObject (readonly)

Returns the value of attribute agoda.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def agoda
  @agoda
end

#airbnbObject (readonly)

Returns the value of attribute airbnb.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def airbnb
  @airbnb
end

#amazonObject (readonly)

Returns the value of attribute amazon.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def amazon
  @amazon
end

#apple_app_storeObject (readonly)

Returns the value of attribute apple_app_store.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def apple_app_store
  @apple_app_store
end

#autotraderObject (readonly)

Returns the value of attribute autotrader.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def autotrader
  @autotrader
end

#bingObject (readonly)

Returns the value of attribute bing.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def bing
  @bing
end

#bookingObject (readonly)

Returns the value of attribute booking.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def booking
  @booking
end

#chatgptObject (readonly)

Returns the value of attribute chatgpt.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def chatgpt
  @chatgpt
end

#crawlObject (readonly)

Returns the value of attribute crawl.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def crawl
  @crawl
end

#fast_searchObject (readonly)

Returns the value of attribute fast_search.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def fast_search
  @fast_search
end

#fetchObject (readonly)

Returns the value of attribute fetch.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def fetch
  @fetch
end

#geminiObject (readonly)

Returns the value of attribute gemini.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def gemini
  @gemini
end

#googleObject (readonly)

Returns the value of attribute google.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def google
  @google
end

#interactObject (readonly)

Returns the value of attribute interact.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def interact
  @interact
end

#jobsObject (readonly)

Returns the value of attribute jobs.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def jobs
  @jobs
end

#mapObject (readonly)

Returns the value of attribute map.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def map
  @map
end

#perplexityObject (readonly)

Returns the value of attribute perplexity.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def perplexity
  @perplexity
end

#redditObject (readonly)

Returns the value of attribute reddit.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def reddit
  @reddit
end

#searchObject (readonly)

Returns the value of attribute search.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def search
  @search
end

#targetObject (readonly)

Returns the value of attribute target.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def target
  @target
end

#tiktokObject (readonly)

Returns the value of attribute tiktok.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def tiktok
  @tiktok
end

#walmartObject (readonly)

Returns the value of attribute walmart.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def walmart
  @walmart
end

#youtubeObject (readonly)

Returns the value of attribute youtube.



28
29
30
# File 'lib/scrapio/client.rb', line 28

def youtube
  @youtube
end