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.



31
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
# File 'lib/scrapio/client.rb', line 31

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)
  @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.



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

def agoda
  @agoda
end

#airbnbObject (readonly)

Returns the value of attribute airbnb.



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

def airbnb
  @airbnb
end

#amazonObject (readonly)

Returns the value of attribute amazon.



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

def amazon
  @amazon
end

#apple_app_storeObject (readonly)

Returns the value of attribute apple_app_store.



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

def apple_app_store
  @apple_app_store
end

#bingObject (readonly)

Returns the value of attribute bing.



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

def bing
  @bing
end

#bookingObject (readonly)

Returns the value of attribute booking.



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

def booking
  @booking
end

#chatgptObject (readonly)

Returns the value of attribute chatgpt.



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

def chatgpt
  @chatgpt
end

#crawlObject (readonly)

Returns the value of attribute crawl.



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

def crawl
  @crawl
end

#fast_searchObject (readonly)

Returns the value of attribute fast_search.



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

def fast_search
  @fast_search
end

#fetchObject (readonly)

Returns the value of attribute fetch.



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

def fetch
  @fetch
end

#geminiObject (readonly)

Returns the value of attribute gemini.



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

def gemini
  @gemini
end

#googleObject (readonly)

Returns the value of attribute google.



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

def google
  @google
end

#interactObject (readonly)

Returns the value of attribute interact.



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

def interact
  @interact
end

#jobsObject (readonly)

Returns the value of attribute jobs.



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

def jobs
  @jobs
end

#mapObject (readonly)

Returns the value of attribute map.



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

def map
  @map
end

#perplexityObject (readonly)

Returns the value of attribute perplexity.



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

def perplexity
  @perplexity
end

#redditObject (readonly)

Returns the value of attribute reddit.



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

def reddit
  @reddit
end

#searchObject (readonly)

Returns the value of attribute search.



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

def search
  @search
end

#targetObject (readonly)

Returns the value of attribute target.



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

def target
  @target
end

#tiktokObject (readonly)

Returns the value of attribute tiktok.



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

def tiktok
  @tiktok
end

#walmartObject (readonly)

Returns the value of attribute walmart.



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

def walmart
  @walmart
end

#youtubeObject (readonly)

Returns the value of attribute youtube.



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

def youtube
  @youtube
end