Class: Scrapio::Resources::Walmart
- Inherits:
-
Object
- Object
- Scrapio::Resources::Walmart
- Defined in:
- lib/scrapio/resources/walmart.rb
Instance Method Summary collapse
- #get_product(product_id, country: nil) ⇒ Object
-
#initialize(http) ⇒ Walmart
constructor
A new instance of Walmart.
- #search(query, country: nil, page: nil) ⇒ Object
Constructor Details
#initialize(http) ⇒ Walmart
Returns a new instance of Walmart.
4 |
# File 'lib/scrapio/resources/walmart.rb', line 4 def initialize(http) = @http = http |
Instance Method Details
#get_product(product_id, country: nil) ⇒ Object
6 7 8 |
# File 'lib/scrapio/resources/walmart.rb', line 6 def get_product(product_id, country: nil) @http.get("/v1/walmart/product", { product_id: product_id, country: country }) end |
#search(query, country: nil, page: nil) ⇒ Object
10 11 12 |
# File 'lib/scrapio/resources/walmart.rb', line 10 def search(query, country: nil, page: nil) @http.get("/v1/walmart/search", { query: query, country: country, page: page }) end |