bbr 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b952dd23a4593e8211abea713f57043c68ee9e1
4
- data.tar.gz: 90730c15a0c7f350f19aa8e49dc30f7e90f7a652
3
+ metadata.gz: 267a69da0caa277f9e2be0e45a8bfb5a54291b7f
4
+ data.tar.gz: de52e5432d136b2a75a9947eca79b751d08b625f
5
5
  SHA512:
6
- metadata.gz: dc738b79f72bffdd1b46fe61123be3083cc4416bb54bdedb21d514d2189f1a14e6dbc6f1011427ea5e3111ebdb672ceaed7f8f1c15bff00ee64e39fd614bcca6
7
- data.tar.gz: 2c02b86122de465ccfa58057945723458f9446297eb07f29aa310b4fd8cb06c3a6aef6e3da759d2380f3040aa4ddc20ae8f6e4c83702ac136f6959ce9cdc5176
6
+ metadata.gz: 881f2cfd41e7ad6fec3227949ec0bc80d5009a874a3c9d00e3ff848728fd35cdf1ea548604ff467ba4583119563f49070e2450b3abaf206698dd066218b5c24c
7
+ data.tar.gz: 178508e889f6426480c53c2e998fc5e69709d6e03f550831e007162e384a6682440c362f5c57430e3b04a93bf7d6732e55112232ca2eaf735e376887be25c3ef
data/CHANGELOG.md CHANGED
@@ -14,3 +14,7 @@
14
14
 
15
15
  * add attr accessors to BBR module
16
16
  * change response structure
17
+
18
+ ## v.1.0.4
19
+
20
+ * add raw_building_data_from_bbr_id method to access raw response data from BBR
data/README.md CHANGED
@@ -33,7 +33,13 @@ Contact Nicolai or Jesper for credentials if you are a member of the Abtion Team
33
33
 
34
34
  ```ruby
35
35
  BBR.building_data_from_address("Danas Plads 17, 1915 Frederiksberg")
36
- => {:building_area=>"427", :building_age=>98, :roof_type=>"Tegl", :roof_tilt=>3, :heating=>"FjernvarmeBlokvarme", :heating_source=>"NotDefined", :formatted_heating=>"Fjernvarme", :outer_wall_material=>"Mursten"}
36
+ => {:building=>{:age=>98, :area=>"427", :floors=>"6", :roof=>{:material=>"Tegl", :area=>"0"}, :heating=>{:installation=>"FjernvarmeBlokvarme", :means=>"NotDefined"}, :outer_wall=>{:material=>"Mursten"}}}
37
+
38
+ ```
39
+
40
+ ```ruby
41
+ BBR.raw_building_data_from_address("Danas Plads 17, 1915 Frederiksberg")
42
+ => LOTS OF XML
37
43
 
38
44
  ```
39
45
 
@@ -6,6 +6,10 @@ module BBR
6
6
  id.present? ? formatted_response(request(request_action, xml_body(id))) : Hash.new
7
7
  end
8
8
 
9
+ def self.raw_call(id)
10
+ request(request_action, xml_body(id)) if id.present?
11
+ end
12
+
9
13
  private
10
14
  def self.xml_body(id)
11
15
  <<-XML
@@ -29,7 +33,6 @@ module BBR
29
33
  roof: {
30
34
  material: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
31
35
  area: response.at_xpath("//UdnyttetTagetageareal").try(:content)
32
-
33
36
  },
34
37
  heating: {
35
38
  installation: response.at_xpath("//Varmeinstallation/Value").try(:content),
data/lib/bbr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bbr
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
data/lib/bbr.rb CHANGED
@@ -22,6 +22,10 @@ module BBR
22
22
  BBR::GetBuildingDataFromId.call(id)
23
23
  end
24
24
 
25
+ def self.raw_building_data_from_bbr_id(id)
26
+ BBR::GetBuildingDataFromId.raw_call(id)
27
+ end
28
+
25
29
  private
26
30
  def request(action, body)
27
31
  response = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesper Sørensen & Nicolai Seerup