apidae 1.2.11 → 1.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/apidae/apidae_data_parser.rb +14 -7
- data/app/models/apidae/obj.rb +4 -4
- data/lib/apidae/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: e6328cf95e7370caddefa777e6ea8961a223abdf
|
4
|
+
data.tar.gz: 6b05f7fb8c516a133c779b9fd86c7975842caf34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a4d01a2148400205b3841f82792a244fd1a61c73ea64dd70d28463cc482589e370896d309e5e22206ca00f8e416a78575a88d846b556bbea2e944e9c7aff100
|
7
|
+
data.tar.gz: 4e253373d0c77aac15b455cdd9dc652afc2bb0669d3db4196ef1e63014ccf5049ee359ca5e2e5b64d1ebc120966a21eefc3f313935690599f641e84f6a5f36db
|
@@ -223,6 +223,8 @@ module Apidae
|
|
223
223
|
loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
|
224
224
|
loc_data[:longitude] = geoloc_details[:geoJson][:coordinates][0]
|
225
225
|
end
|
226
|
+
loc_data[:map_reference] = geoloc_details[:reperePlan]
|
227
|
+
loc_data[:altitude] = geoloc_details[:altitude] if geoloc_details
|
226
228
|
loc_data[:access] = node_value(geoloc_details, :complement) if geoloc_details
|
227
229
|
loc_data[:environments] = location_hash[:environnements].map {|e| e[:id]} if location_hash[:environnements]
|
228
230
|
end
|
@@ -266,7 +268,7 @@ module Apidae
|
|
266
268
|
apidae_obj.apidae_subtype = node_id(data_hash, :rubrique) if apidae_obj.apidae_type == Obj::EQU
|
267
269
|
apidae_obj.apidae_subtype = lists_ids(data_hash[:typesHebergement]).first if apidae_obj.apidae_type == Obj::SPA
|
268
270
|
{
|
269
|
-
categories: lists_ids(data_hash[:categories], data_hash[:typesDetailles], data_hash[:activiteCategories]),
|
271
|
+
categories: lists_ids(data_hash[:categories], data_hash[:typesDetailles], data_hash[:activiteCategories], data_hash[:typesHabitation]),
|
270
272
|
themes: lists_ids(data_hash[:themes]),
|
271
273
|
capacity: (data_hash[:capacite] || {})
|
272
274
|
.merge(presta_hash ? {group_min: presta_hash[:tailleGroupeMin], group_max: presta_hash[:tailleGroupeMax],
|
@@ -277,7 +279,8 @@ module Apidae
|
|
277
279
|
(node_id(data_hash, :typeLabel) ? [node_id(data_hash, :typeLabel)] : []),
|
278
280
|
chains: lists_ids(data_hash[:chaines]) + nodes_ids(data_hash[:chaineEtLabel]),
|
279
281
|
area: apidae_obj.apidae_type == Obj::DOS ? data_hash.except(:classification) : node_value(data_hash, :lieuDePratique),
|
280
|
-
track: apidae_obj.apidae_type == Obj::EQU ? data_hash[:itineraire] : nil,
|
282
|
+
track: apidae_obj.apidae_type == Obj::EQU ? (data_hash[:itineraire] || {}).except(:passagesDelicats) : nil,
|
283
|
+
tricky_sections: apidae_obj.apidae_type == Obj::EQU ? node_value(data_hash[:itineraire], :passagesDelicats, *locales) : nil,
|
281
284
|
products: lists_ids(data_hash[:typesProduit], data_hash[:aopAocIgps], data_hash[:specialites]),
|
282
285
|
audience: lists_ids(prestations_hash[:typesClientele]),
|
283
286
|
animals: {allowed: prestations_hash[:animauxAcceptes] == 'ACCEPTES', desc: node_value(prestations_hash, :descriptifAnimauxAcceptes, *locales),
|
@@ -319,13 +322,17 @@ module Apidae
|
|
319
322
|
tags
|
320
323
|
end
|
321
324
|
|
322
|
-
def self.parse_booking(reservation_hash, *locales)
|
325
|
+
def self.parse_booking(reservation_hash, visits_hash, *locales)
|
326
|
+
booking_hash = {}
|
323
327
|
if reservation_hash
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
+
booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
|
329
|
+
booking_hash[:booking_entities] = reservation_hash[:organismes]
|
330
|
+
end
|
331
|
+
if visits_hash
|
332
|
+
booking_hash[:visits_allowed] = visits_hash[:visitable] == true
|
333
|
+
booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
|
328
334
|
end
|
335
|
+
booking_hash
|
329
336
|
end
|
330
337
|
|
331
338
|
def self.parse_town(location_hash)
|
data/app/models/apidae/obj.rb
CHANGED
@@ -15,15 +15,15 @@ module Apidae
|
|
15
15
|
store_accessor :pictures_data, :pictures
|
16
16
|
store_accessor :attachments_data, :attachments
|
17
17
|
store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
|
18
|
-
:products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
|
18
|
+
:tricky_sections, :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
|
19
19
|
store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider
|
20
20
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
|
21
21
|
:mobile_website, :shorty_url, :contacts
|
22
|
-
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
|
22
|
+
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
|
23
23
|
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
|
24
24
|
store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra
|
25
25
|
store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
|
26
|
-
store_accessor :booking_data, :booking_desc, :booking_entities
|
26
|
+
store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc
|
27
27
|
store_accessor :tags_data, :promo, :internal, :linked
|
28
28
|
store_accessor :version_data, :versioned_fields
|
29
29
|
|
@@ -185,7 +185,7 @@ module Apidae
|
|
185
185
|
apidae_obj.town = ApidaeDataParser.parse_town(object_data[:localisation])
|
186
186
|
apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], *locales)
|
187
187
|
apidae_obj.rates_data = ApidaeDataParser.parse_rates(object_data[:descriptionTarif], *locales)
|
188
|
-
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], *locales)
|
188
|
+
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], object_data[:visites], *locales)
|
189
189
|
apidae_obj.type_data = ApidaeDataParser.parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
|
190
190
|
object_data[:tourismeAffaires], *locales)
|
191
191
|
apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
|
data/lib/apidae/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apidae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|