booking-ruby 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/booking_api/client.rb +10 -0
- data/lib/booking_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 310fb57b413207f75b188003832df4d918077340
|
4
|
+
data.tar.gz: 7b9f0d5efce5b8b734b0f7144cdb645719951ae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff98faa6ea765fb932ddf1271140542641538ceaa43ea17a94e4064d8378e803c2b25745a98d1544b577b53c584db839229540b67427e2934cc9e842b7119525
|
7
|
+
data.tar.gz: 9cab2be0ce458a0e8e880a12f7ba99a38c29076f3162e8d1b493a02ae3738fd103816940246455f6b4d5c4b7a82a94e48fbd474cbb1f4a07168c746bbdf5f7dc
|
data/lib/booking_api/client.rb
CHANGED
@@ -9,6 +9,7 @@ module BookingApi
|
|
9
9
|
@http_service
|
10
10
|
end
|
11
11
|
|
12
|
+
# checks for the given parameters if the hotel is available
|
12
13
|
def get_hotel_availabillity(request_parameters: {})
|
13
14
|
default_parameters = {
|
14
15
|
room1: "A,A",
|
@@ -16,6 +17,7 @@ module BookingApi
|
|
16
17
|
http_service.request_post("/json/getHotelAvailabilityV2", default_parameters.merge(request_parameters))
|
17
18
|
end
|
18
19
|
|
20
|
+
# gets hotel photos for the given hotel ids
|
19
21
|
def hotel_description_photos(hotel_ids: [], request_parameters: {})
|
20
22
|
raise ArgumentError if hotel_ids.empty?
|
21
23
|
default_parameters = {
|
@@ -25,11 +27,19 @@ module BookingApi
|
|
25
27
|
Images::ResponseList.new(response)
|
26
28
|
end
|
27
29
|
|
30
|
+
# gets detailed descriptions for the given hotels
|
28
31
|
def get_hotel_description_translations(request_parameters: {})
|
29
32
|
default_parameters = {}
|
30
33
|
http_service.request_post("/json/bookings.getHotelDescriptionTranslations", default_parameters.merge(request_parameters))
|
31
34
|
end
|
32
35
|
|
36
|
+
# gets an overview of the data for the given hotel ids.
|
37
|
+
def get_hotel_overviews(hotel_ids: [], request_parameters: {})
|
38
|
+
default_parameters = {}
|
39
|
+
default_parameters[:hotel_ids] = hotel_ids.join(",") if hotel_ids.any?
|
40
|
+
http_service.request_post("/json/bookings.getHotels", default_parameters.merge(request_parameters))
|
41
|
+
end
|
42
|
+
|
33
43
|
private
|
34
44
|
|
35
45
|
end
|
data/lib/booking_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: booking-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Kleinwaechter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|