Class: Scrapio::Client
- Inherits:
-
Object
- Object
- Scrapio::Client
- Defined in:
- lib/scrapio/client.rb
Instance Attribute Summary collapse
-
#amazon ⇒ Object
readonly
Returns the value of attribute amazon.
-
#crawl ⇒ Object
readonly
Returns the value of attribute crawl.
-
#fetch ⇒ Object
readonly
Returns the value of attribute fetch.
-
#google ⇒ Object
readonly
Returns the value of attribute google.
-
#interact ⇒ Object
readonly
Returns the value of attribute interact.
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
-
#walmart ⇒ Object
readonly
Returns the value of attribute walmart.
-
#youtube ⇒ Object
readonly
Returns the value of attribute youtube.
Instance Method Summary collapse
-
#initialize(api_key, base_url: HttpClient::DEFAULT_BASE_URL, timeout: HttpClient::DEFAULT_TIMEOUT) ⇒ Client
constructor
A new instance of Client.
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
#amazon ⇒ Object (readonly)
Returns the value of attribute amazon.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def amazon @amazon end |
#crawl ⇒ Object (readonly)
Returns the value of attribute crawl.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def crawl @crawl end |
#fetch ⇒ Object (readonly)
Returns the value of attribute fetch.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def fetch @fetch end |
#google ⇒ Object (readonly)
Returns the value of attribute google.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def google @google end |
#interact ⇒ Object (readonly)
Returns the value of attribute interact.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def interact @interact end |
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def jobs @jobs end |
#walmart ⇒ Object (readonly)
Returns the value of attribute walmart.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def walmart @walmart end |
#youtube ⇒ Object (readonly)
Returns the value of attribute youtube.
13 14 15 |
# File 'lib/scrapio/client.rb', line 13 def youtube @youtube end |