booking-ruby 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/booking.gemspec +1 -0
- data/lib/booking_api.rb +2 -0
- data/lib/booking_api/images/image.rb +18 -1
- data/lib/booking_api/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b0550f90543c4136165db0babbc7c8a5c99b313
|
4
|
+
data.tar.gz: acd49ee3294d17740533a71123205fbc0a4caaf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a11bd857c85bc345bacbd81944364e970deb77bfa967b3d582bfa81e7c87c30779d4a5fbcafba5c721438fd1a27e34a978414f7f64aef0306cedcd304662f4
|
7
|
+
data.tar.gz: 7e11027627a752007df6f99e3374b5c0f622bbe38d7debfc992b1b21c103bb92e1c6d6f938f5ce94bce6609ac8b3ed545773d0eee901af8f907917adc81832ab
|
data/booking.gemspec
CHANGED
data/lib/booking_api.rb
CHANGED
@@ -3,8 +3,25 @@ module BookingApi
|
|
3
3
|
module Images
|
4
4
|
class Image
|
5
5
|
attr_reader :raw_data
|
6
|
+
|
6
7
|
def initialize(raw_data = {})
|
7
|
-
@raw_data = raw_data
|
8
|
+
@raw_data = raw_data.with_indifferent_access
|
9
|
+
end
|
10
|
+
|
11
|
+
def hotel_id
|
12
|
+
@raw_data[:hotel_id].to_i
|
13
|
+
end
|
14
|
+
|
15
|
+
def photo_id
|
16
|
+
@raw_data[:photo_id].to_i
|
17
|
+
end
|
18
|
+
|
19
|
+
def largest_file_url
|
20
|
+
@raw_data[:url_original].gsub("max500", "840x460")
|
21
|
+
end
|
22
|
+
|
23
|
+
def is_default_image?
|
24
|
+
@raw_data[:descriptiontype_id].to_i == 10
|
8
25
|
end
|
9
26
|
end
|
10
27
|
end
|
data/lib/booking_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendrik Kleinwaechter
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: activesupport
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description:
|
126
140
|
email:
|
127
141
|
- hendrik.kleinwaechter@gmail.com
|