immoscout 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +30 -0
- data/.gitignore +14 -0
- data/.reek +6 -0
- data/.rspec +2 -0
- data/.rubocop.yml +15 -0
- data/.simplecov +3 -0
- data/.travis.yml +20 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/LICENSE +21 -0
- data/README.md +250 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/assets/logo.png +0 -0
- data/doc/assets/project.png +0 -0
- data/doc/assets/project.xcf +0 -0
- data/immoscout.gemspec +47 -0
- data/lib/immoscout.rb +27 -0
- data/lib/immoscout/api/client.rb +27 -0
- data/lib/immoscout/api/connection.rb +34 -0
- data/lib/immoscout/api/request.rb +33 -0
- data/lib/immoscout/configuration.rb +27 -0
- data/lib/immoscout/errors/failed.rb +11 -0
- data/lib/immoscout/models.rb +9 -0
- data/lib/immoscout/models/actions/attachment.rb +82 -0
- data/lib/immoscout/models/actions/contact.rb +75 -0
- data/lib/immoscout/models/actions/publish.rb +33 -0
- data/lib/immoscout/models/actions/real_estate.rb +122 -0
- data/lib/immoscout/models/apartment_buy.rb +90 -0
- data/lib/immoscout/models/base.rb +48 -0
- data/lib/immoscout/models/concerns/modelable.rb +55 -0
- data/lib/immoscout/models/concerns/propertiable.rb +56 -0
- data/lib/immoscout/models/concerns/renderable.rb +63 -0
- data/lib/immoscout/models/contact.rb +59 -0
- data/lib/immoscout/models/document.rb +31 -0
- data/lib/immoscout/models/house_buy.rb +87 -0
- data/lib/immoscout/models/parts/address.rb +26 -0
- data/lib/immoscout/models/parts/api_search_data.rb +19 -0
- data/lib/immoscout/models/parts/contact.rb +18 -0
- data/lib/immoscout/models/parts/coordinate.rb +18 -0
- data/lib/immoscout/models/parts/courtage.rb +19 -0
- data/lib/immoscout/models/parts/energy_certificate.rb +19 -0
- data/lib/immoscout/models/parts/energy_source.rb +17 -0
- data/lib/immoscout/models/parts/firing_type.rb +17 -0
- data/lib/immoscout/models/parts/geo_code.rb +18 -0
- data/lib/immoscout/models/parts/geo_hierarchy.rb +23 -0
- data/lib/immoscout/models/parts/price.rb +20 -0
- data/lib/immoscout/models/parts/publish_channel.rb +17 -0
- data/lib/immoscout/models/parts/real_estate.rb +17 -0
- data/lib/immoscout/models/parts/url.rb +18 -0
- data/lib/immoscout/models/parts/urls.rb +18 -0
- data/lib/immoscout/models/picture.rb +33 -0
- data/lib/immoscout/models/publish.rb +23 -0
- data/lib/immoscout/version.rb +5 -0
- metadata +268 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'concerns/renderable'
|
4
|
+
require_relative 'concerns/propertiable'
|
5
|
+
require_relative 'actions/attachment'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
class Document < Base
|
10
|
+
include Immoscout::Models::Concerns::Renderable
|
11
|
+
include Immoscout::Models::Concerns::Propertiable
|
12
|
+
include Immoscout::Models::Actions::Attachment
|
13
|
+
|
14
|
+
attr_accessor :attachable, :file
|
15
|
+
|
16
|
+
self.json_wrapper = "common.attachment"
|
17
|
+
|
18
|
+
property :id, alias: :@id
|
19
|
+
property :type, alias: :'@xsi.type'
|
20
|
+
property :href, alias: :'@xlink.href'
|
21
|
+
property :publish_date, alias: :@publish_date
|
22
|
+
property :creation, alias: :@creation
|
23
|
+
property :modification, alias: :@modification
|
24
|
+
property :title
|
25
|
+
property :external_id
|
26
|
+
property :external_check_sum
|
27
|
+
property :floorplan
|
28
|
+
property :url
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'concerns/renderable'
|
4
|
+
require_relative 'concerns/propertiable'
|
5
|
+
require_relative 'actions/real_estate'
|
6
|
+
require_relative 'parts/api_search_data'
|
7
|
+
require_relative 'parts/address'
|
8
|
+
require_relative 'parts/contact'
|
9
|
+
require_relative 'parts/price'
|
10
|
+
require_relative 'parts/courtage'
|
11
|
+
require_relative 'parts/energy_source'
|
12
|
+
require_relative 'parts/energy_certificate'
|
13
|
+
require_relative 'parts/firing_type'
|
14
|
+
|
15
|
+
module Immoscout
|
16
|
+
module Models
|
17
|
+
class HouseBuy < Base
|
18
|
+
include Immoscout::Models::Concerns::Renderable
|
19
|
+
include Immoscout::Models::Concerns::Propertiable
|
20
|
+
include Immoscout::Models::Actions::RealEstate
|
21
|
+
|
22
|
+
self.json_wrapper = "realestates.houseBuy"
|
23
|
+
|
24
|
+
property :id, alias: :@id
|
25
|
+
property :external_id
|
26
|
+
property :title
|
27
|
+
property :creation_date
|
28
|
+
property :last_modification_date
|
29
|
+
property :type, alias: :'@xsi.type'
|
30
|
+
property :href, alias: :'@xlink.href'
|
31
|
+
property :publish_date, alias: :@publish_date
|
32
|
+
property :creation, alias: :@creation
|
33
|
+
property :modification, alias: :@modification
|
34
|
+
property :group_number
|
35
|
+
property :real_estate_project_id
|
36
|
+
property :address, coerce: Immoscout::Models::Parts::Address
|
37
|
+
property :api_search_data, coerce: Immoscout::Models::Parts::ApiSearchData
|
38
|
+
property :real_estate_state
|
39
|
+
property :description_note
|
40
|
+
property :furnishing_note
|
41
|
+
property :location_note
|
42
|
+
property :other_note
|
43
|
+
property :show_address
|
44
|
+
property :contact, coerce: Immoscout::Models::Parts::Contact
|
45
|
+
property :building_type
|
46
|
+
property :price, coerce: Immoscout::Models::Parts::Price
|
47
|
+
property :courtage, coerce: Immoscout::Models::Parts::Courtage
|
48
|
+
property :energy_sources_enev2014,
|
49
|
+
coerce: Immoscout::Models::Parts::EnergySource
|
50
|
+
property :energy_certificate,
|
51
|
+
coerce: Immoscout::Models::Parts::EnergyCertificate
|
52
|
+
property :firing_types,
|
53
|
+
coerce: Immoscout::Models::Parts::FiringType, array: true
|
54
|
+
property :cellar
|
55
|
+
property :handicapped_accessible
|
56
|
+
property :number_of_parking_spaces
|
57
|
+
property :condition
|
58
|
+
property :last_refurbishment
|
59
|
+
property :interior_quality
|
60
|
+
property :construction_year
|
61
|
+
property :free_from
|
62
|
+
property :heating_type
|
63
|
+
property :heating_type_enev2014
|
64
|
+
property :building_energy_rating_type
|
65
|
+
property :thermal_characteristic
|
66
|
+
property :energy_consumption_contains_warm_water
|
67
|
+
property :number_of_floors
|
68
|
+
property :usable_floor_space
|
69
|
+
property :number_of_bed_rooms
|
70
|
+
property :number_of_bath_rooms
|
71
|
+
property :guest_toilet
|
72
|
+
property :parking_space_type
|
73
|
+
property :rented
|
74
|
+
property :rental_income
|
75
|
+
property :listed
|
76
|
+
property :parking_space_price
|
77
|
+
property :summer_residence_practical
|
78
|
+
property :living_space
|
79
|
+
property :number_of_rooms
|
80
|
+
property :energy_performance_certificate
|
81
|
+
# house specific properties
|
82
|
+
property :lodger_flat
|
83
|
+
property :construction_phase
|
84
|
+
property :plot_area
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../parts/coordinate'
|
5
|
+
require_relative '../parts/geo_hierarchy'
|
6
|
+
require_relative '../concerns/propertiable'
|
7
|
+
require_relative '../concerns/renderable'
|
8
|
+
|
9
|
+
module Immoscout
|
10
|
+
module Models
|
11
|
+
module Parts
|
12
|
+
class Address < Base
|
13
|
+
include Immoscout::Models::Concerns::Renderable
|
14
|
+
include Immoscout::Models::Concerns::Propertiable
|
15
|
+
property :street
|
16
|
+
property :house_number
|
17
|
+
property :postcode
|
18
|
+
property :city
|
19
|
+
property :wgs84_coordinate, coerce: Immoscout::Models::Parts::Coordinate
|
20
|
+
property :geo_hierarchy,
|
21
|
+
coerce: Immoscout::Models::Parts::GeoHierarchy,
|
22
|
+
readonly: true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class ApiSearchData < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :search_field1
|
14
|
+
property :search_field2
|
15
|
+
property :search_field3
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class Contact < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :id, alias: :@id
|
14
|
+
property :external_id, alias: :@external_id
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class Coordinate < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :latitude
|
14
|
+
property :longitude
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class Courtage < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :has_courtage
|
14
|
+
property :courtage
|
15
|
+
property :courtage_note
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class EnergyCertificate < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :energy_certificate_availability
|
14
|
+
property :energy_certificate_creation_date
|
15
|
+
property :energy_efficiency_class
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class EnergySource < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :energy_source_enev2014
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class FiringType < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :firing_type
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class GeoCode < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :geo_code_id
|
14
|
+
property :full_geo_code_id
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
require_relative 'geo_code'
|
7
|
+
|
8
|
+
module Immoscout
|
9
|
+
module Models
|
10
|
+
module Parts
|
11
|
+
class GeoHierarchy < Base
|
12
|
+
include Immoscout::Models::Concerns::Renderable
|
13
|
+
include Immoscout::Models::Concerns::Propertiable
|
14
|
+
property :continent, coerce: Immoscout::Models::Parts::GeoCode
|
15
|
+
property :country, coerce: Immoscout::Models::Parts::GeoCode
|
16
|
+
property :region, coerce: Immoscout::Models::Parts::GeoCode
|
17
|
+
property :city, coerce: Immoscout::Models::Parts::GeoCode
|
18
|
+
property :quarter, coerce: Immoscout::Models::Parts::GeoCode
|
19
|
+
property :neighbourhood, coerce: Immoscout::Models::Parts::GeoCode
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class Price < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :value
|
14
|
+
property :currency
|
15
|
+
property :marketing_type
|
16
|
+
property :price_interval_type
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class PublishChannel < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :id, alias: :@id, default: 10_000
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class RealEstate < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :id, alias: :@id
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
|
7
|
+
module Immoscout
|
8
|
+
module Models
|
9
|
+
module Parts
|
10
|
+
class Url < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
property :scale, alias: :@scale
|
14
|
+
property :href, alias: :@href
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../base'
|
4
|
+
require_relative '../concerns/propertiable'
|
5
|
+
require_relative '../concerns/renderable'
|
6
|
+
require_relative 'url'
|
7
|
+
|
8
|
+
module Immoscout
|
9
|
+
module Models
|
10
|
+
module Parts
|
11
|
+
class Urls < Base
|
12
|
+
include Immoscout::Models::Concerns::Renderable
|
13
|
+
include Immoscout::Models::Concerns::Propertiable
|
14
|
+
property :url, coerce: Immoscout::Models::Parts::Url, array: true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'concerns/renderable'
|
4
|
+
require_relative 'concerns/propertiable'
|
5
|
+
require_relative 'parts/urls'
|
6
|
+
require_relative 'actions/attachment'
|
7
|
+
|
8
|
+
module Immoscout
|
9
|
+
module Models
|
10
|
+
class Picture < Base
|
11
|
+
include Immoscout::Models::Concerns::Renderable
|
12
|
+
include Immoscout::Models::Concerns::Propertiable
|
13
|
+
include Immoscout::Models::Actions::Attachment
|
14
|
+
|
15
|
+
attr_accessor :attachable, :file
|
16
|
+
|
17
|
+
self.json_wrapper = "common.attachment"
|
18
|
+
|
19
|
+
property :id, alias: :@id
|
20
|
+
property :type, alias: :'@xsi.type', default: "common:Picture"
|
21
|
+
property :href, alias: :'@xlink.href'
|
22
|
+
property :publish_date, alias: :@publish_date
|
23
|
+
property :creation, alias: :@creation
|
24
|
+
property :modification, alias: :@modification
|
25
|
+
property :title
|
26
|
+
property :external_id
|
27
|
+
property :external_check_sum
|
28
|
+
property :floorplan
|
29
|
+
property :title_picture
|
30
|
+
property :urls, coerce: Immoscout::Models::Parts::Urls, array: true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|