Class: Scrapio::Resources::Airbnb
- Inherits:
-
Object
- Object
- Scrapio::Resources::Airbnb
- Defined in:
- lib/scrapio/resources/airbnb.rb
Instance Method Summary collapse
- #get_listing(listing_id, check_in: nil, check_out: nil, adults: nil) ⇒ Object
-
#initialize(http) ⇒ Airbnb
constructor
A new instance of Airbnb.
- #search(location:, check_in: nil, check_out: nil, adults: nil, children: nil, infants: nil, pets: nil) ⇒ Object
Constructor Details
#initialize(http) ⇒ Airbnb
Returns a new instance of Airbnb.
4 |
# File 'lib/scrapio/resources/airbnb.rb', line 4 def initialize(http) = @http = http |
Instance Method Details
#get_listing(listing_id, check_in: nil, check_out: nil, adults: nil) ⇒ Object
13 14 15 16 17 |
# File 'lib/scrapio/resources/airbnb.rb', line 13 def get_listing(listing_id, check_in: nil, check_out: nil, adults: nil) @http.get("/v1/airbnb/listing", { listing_id: listing_id, check_in: check_in, check_out: check_out, adults: adults, }) end |
#search(location:, check_in: nil, check_out: nil, adults: nil, children: nil, infants: nil, pets: nil) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/scrapio/resources/airbnb.rb', line 6 def search(location:, check_in: nil, check_out: nil, adults: nil, children: nil, infants: nil, pets: nil) @http.get("/v1/airbnb/search", { location: location, check_in: check_in, check_out: check_out, adults: adults, children: children, infants: infants, pets: pets, }) end |