Module: TravelPayouts::Api::Hotel
- Included in:
- TravelPayouts::Api
- Defined in:
- lib/travelpayouts_api/hotel.rb
Instance Method Summary collapse
- #hotel_amenities ⇒ Object
- #hotel_amenities_url ⇒ Object
- #hotel_countries ⇒ Object
- #hotel_countries_url ⇒ Object
- #hotel_locations ⇒ Object
- #hotel_locations_url ⇒ Object
- #hotel_lookup(query:, lang: nil, look_for: nil, limit: 10, convert_case: true) ⇒ Object
- #hotel_lookup_url ⇒ Object
- #hotel_prices(user_ip:, check_in:, check_out:, location: nil, location_id: nil, hotel_id: nil, hotel: nil, limit: 10) ⇒ Object
- #hotel_prices_url ⇒ Object
- #hotel_room_types ⇒ Object
- #hotel_room_types_url ⇒ Object
- #hotel_search_result(search_id:, limit: 0, offset: 0, sort_by: :popularity, sort_asc: 1, rooms_count: 0) ⇒ Object
- #hotel_search_result_url ⇒ Object
- #hotel_search_start(city_id: nil, hotel_id: nil, iata: nil, check_in:, check_out:, adults_count:, user_ip:, children_count: 0, child_age1: 0, child_age2: 0, child_age3: 0, lang: nil, currency: nil, wait_for_result: 0, timeout: 20) ⇒ Object
- #hotel_search_start_url ⇒ Object
- #hotel_types ⇒ Object
- #hotel_types_url ⇒ Object
- #hotels_list(location_id:) ⇒ Object
- #hotels_list_url ⇒ Object
Instance Method Details
#hotel_amenities ⇒ Object
75 76 77 |
# File 'lib/travelpayouts_api/hotel.rb', line 75 def hotel_amenities signed_hotel_request :get, hotel_amenities_url, {} end |
#hotel_amenities_url ⇒ Object
20 21 22 |
# File 'lib/travelpayouts_api/hotel.rb', line 20 def hotel_amenities_url 'http://engine.hotellook.com/api/v2/static/amenities.json' end |
#hotel_countries ⇒ Object
67 68 69 |
# File 'lib/travelpayouts_api/hotel.rb', line 67 def hotel_countries signed_hotel_request :get, hotel_countries_url, {} end |
#hotel_countries_url ⇒ Object
12 13 14 |
# File 'lib/travelpayouts_api/hotel.rb', line 12 def hotel_countries_url 'http://engine.hotellook.com/api/v2/static/countries.json' end |
#hotel_locations ⇒ Object
71 72 73 |
# File 'lib/travelpayouts_api/hotel.rb', line 71 def hotel_locations signed_hotel_request :get, hotel_locations_url, {} end |
#hotel_locations_url ⇒ Object
16 17 18 |
# File 'lib/travelpayouts_api/hotel.rb', line 16 def hotel_locations_url 'http://engine.hotellook.com/api/v2/static/locations.json' end |
#hotel_lookup(query:, lang: nil, look_for: nil, limit: 10, convert_case: true) ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/travelpayouts_api/hotel.rb', line 44 def hotel_lookup(query:, lang: nil, look_for: nil, limit: 10, convert_case: true) signed_hotel_request :get, hotel_lookup_url, { query: query, lang: lang, lookFor: look_for, limit: limit, convertCase: convert_case.to_s } end |
#hotel_lookup_url ⇒ Object
4 5 6 |
# File 'lib/travelpayouts_api/hotel.rb', line 4 def hotel_lookup_url 'http://engine.hotellook.com/api/v2/lookup.json' end |
#hotel_prices(user_ip:, check_in:, check_out:, location: nil, location_id: nil, hotel_id: nil, hotel: nil, limit: 10) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/travelpayouts_api/hotel.rb', line 54 def hotel_prices(user_ip:, check_in:,check_out:,location:nil,location_id:nil,hotel_id:nil,hotel:nil,limit:10) signed_hotel_request :get, hotel_prices_url, { customerIp: user_ip, checkIn: check_in, checkOut: check_out, location: location, locationId: location_id, hotelId: hotel_id, hotel: hotel, limit: limit } end |
#hotel_prices_url ⇒ Object
8 9 10 |
# File 'lib/travelpayouts_api/hotel.rb', line 8 def hotel_prices_url 'http://yasen.hotellook.com/api/v2/cache.json' end |
#hotel_room_types ⇒ Object
83 84 85 |
# File 'lib/travelpayouts_api/hotel.rb', line 83 def hotel_room_types signed_hotel_request :get, hotel_room_types_url, {} end |
#hotel_room_types_url ⇒ Object
28 29 30 |
# File 'lib/travelpayouts_api/hotel.rb', line 28 def hotel_room_types_url 'http://engine.hotellook.com/api/v2/static/roomTypes.json' end |
#hotel_search_result(search_id:, limit: 0, offset: 0, sort_by: :popularity, sort_asc: 1, rooms_count: 0) ⇒ Object
112 113 114 115 116 117 118 119 120 121 |
# File 'lib/travelpayouts_api/hotel.rb', line 112 def hotel_search_result(search_id:,limit: 0,offset: 0,sort_by: :popularity, sort_asc: 1, rooms_count: 0) signed_hotel_request :get, hotel_search_result_url, { searchId: search_id, limit: limit, offset: offset, sortBy: sort_by, sortAsc: sort_asc, roomsCount: rooms_count } end |
#hotel_search_result_url ⇒ Object
40 41 42 |
# File 'lib/travelpayouts_api/hotel.rb', line 40 def hotel_search_result_url 'http://engine.hotellook.com/api/v2/search/getResult.json' end |
#hotel_search_start(city_id: nil, hotel_id: nil, iata: nil, check_in:, check_out:, adults_count:, user_ip:, children_count: 0, child_age1: 0, child_age2: 0, child_age3: 0, lang: nil, currency: nil, wait_for_result: 0, timeout: 20) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/travelpayouts_api/hotel.rb', line 91 def hotel_search_start(city_id:nil,hotel_id:nil,iata:nil,check_in:,check_out:,adults_count:,user_ip:, children_count:0,child_age1:0,child_age2:0,child_age3:0,lang:nil,currency:nil,wait_for_result:0,timeout:20) signed_hotel_request :get, hotel_search_start_url, { cityId: city_id, hotelId: hotel_id, iata: iata, checkIn: check_in, checkOut: check_out, adultsCount: adults_count, customerIp: user_ip, childrenCount: children_count, childAge1: child_age1, childAge2: child_age2, childAge3: child_age3, lang: lang, currency: currency, waitForResult: wait_for_result, timeout: timeout } end |
#hotel_search_start_url ⇒ Object
36 37 38 |
# File 'lib/travelpayouts_api/hotel.rb', line 36 def hotel_search_start_url 'http://engine.hotellook.com/api/v2/search/start.json' end |
#hotel_types ⇒ Object
87 88 89 |
# File 'lib/travelpayouts_api/hotel.rb', line 87 def hotel_types signed_hotel_request :get, hotel_types_url, {} end |
#hotel_types_url ⇒ Object
32 33 34 |
# File 'lib/travelpayouts_api/hotel.rb', line 32 def hotel_types_url 'http://engine.hotellook.com/api/v2/static/hotelTypes.json' end |
#hotels_list(location_id:) ⇒ Object
79 80 81 |
# File 'lib/travelpayouts_api/hotel.rb', line 79 def hotels_list(location_id:) signed_hotel_request :get, hotels_list_url, {locationId: location_id} end |
#hotels_list_url ⇒ Object
24 25 26 |
# File 'lib/travelpayouts_api/hotel.rb', line 24 def hotels_list_url 'http://engine.hotellook.com/api/v2/static/hotels.json' end |