Class: ScrapeUnblocker::Skyscanner
- Inherits:
-
Object
- Object
- ScrapeUnblocker::Skyscanner
- Defined in:
- lib/scrapeunblocker/skyscanner.rb
Overview
Skyscanner plugin endpoints (flights, hotels, car hire).
Instance Method Summary collapse
- #carhire(params = {}) ⇒ Object
- #carhire_locations(q, params = {}) ⇒ Object
- #flight_locations(q, params = {}) ⇒ Object
- #flights(params = {}) ⇒ Object
- #hotel_locations(q, params = {}) ⇒ Object
- #hotels(params = {}) ⇒ Object
-
#initialize(client) ⇒ Skyscanner
constructor
private
A new instance of Skyscanner.
Constructor Details
#initialize(client) ⇒ Skyscanner
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Skyscanner.
7 8 9 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#carhire(params = {}) ⇒ Object
31 32 33 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 31 def carhire(params = {}) @client.post_json("/carhire/skyscanner-quotes", params) end |
#carhire_locations(q, params = {}) ⇒ Object
27 28 29 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 27 def carhire_locations(q, params = {}) @client.post_json("/carhire/skyscanner-locations", { q: q }.merge(params)) end |
#flight_locations(q, params = {}) ⇒ Object
11 12 13 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 11 def flight_locations(q, params = {}) @client.post_json("/flights/skyscanner-locations", { q: q }.merge(params)) end |
#flights(params = {}) ⇒ Object
15 16 17 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 15 def flights(params = {}) @client.post_json("/flights/skyscanner-quotes", params) end |
#hotel_locations(q, params = {}) ⇒ Object
19 20 21 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 19 def hotel_locations(q, params = {}) @client.post_json("/hotels/skyscanner-locations", { q: q }.merge(params)) end |
#hotels(params = {}) ⇒ Object
23 24 25 |
# File 'lib/scrapeunblocker/skyscanner.rb', line 23 def hotels(params = {}) @client.post_json("/hotels/skyscanner-quotes", params) end |