nwmls_client 1.0.1

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.
@@ -0,0 +1,22 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Manufactured < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "MANU"
9
+ criteria[:property_type] = :manufactured
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ if __FILE__ == $0
19
+ manufactured = NwmlsClient::Manufactured.new()
20
+ listings = manufactured.retrieve_data
21
+ manufactured.display(listings)
22
+ end
@@ -0,0 +1,38 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Member < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:operation] = :retrieve_member_data
9
+ criteria[:data_response] = :retrieve_member_data_response
10
+ criteria[:data_result] = :retrieve_member_data_result
11
+ criteria[:data_types] = :members
12
+ criteria[:data_type] = :member
13
+ @criteria = criteria
14
+ super(@criteria)
15
+ end
16
+
17
+ def display(member_data)
18
+
19
+ if member_data.is_a?(Array)
20
+ member_data.each do |item|
21
+ item.each do |key, value|
22
+ puts "#{key}: #{value}"
23
+ end
24
+ puts "\n"
25
+ end
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ if __FILE__ == $0
34
+ member = NwmlsClient::Member.new()
35
+ data = member.retrieve_data
36
+ #puts "#{data}"
37
+ member.display(data)
38
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Multifamily < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "MULT"
9
+ criteria[:property_type] = :multi_family
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ if __FILE__ == $0
19
+ multi_family = NwmlsClient::Multifamily.new()
20
+ listings = multi_family.retrieve_data
21
+ multi_family.display(listings)
22
+ end
@@ -0,0 +1,38 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Office < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:operation] = :retrieve_office_data
9
+ criteria[:data_response] = :retrieve_office_data_response
10
+ criteria[:data_result] = :retrieve_office_data_result
11
+ criteria[:data_types] = :offices
12
+ criteria[:data_type] = :office
13
+ @criteria = criteria
14
+ super(@criteria)
15
+ end
16
+
17
+ def display(office_data)
18
+
19
+ if office_data.is_a?(Array)
20
+ office_data.each do |item|
21
+ item.each do |key, value|
22
+ puts "#{key}: #{value}"
23
+ end
24
+ puts "\n"
25
+ end
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ if __FILE__ == $0
34
+ office = NwmlsClient::Office.new()
35
+ data = office.retrieve_data
36
+ #puts "#{data}"
37
+ office.display(data)
38
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Rental < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "RENT"
9
+ criteria[:property_type] = :rental
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+
19
+ if __FILE__ == $0
20
+ rental = NwmlsClient::Rental.new()
21
+ listings = rental.retrieve_data
22
+ rental.display(listings)
23
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Residential < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "RESI"
9
+ criteria[:property_type] = :residential
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ if __FILE__ == $0
19
+ residential = NwmlsClient::Residential.new()
20
+ listings = residential.retrieve_data
21
+ #puts "#{listings}"
22
+ residential.display(listings)
23
+ end
@@ -0,0 +1,38 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class School < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:operation] = :retrieve_school_data
9
+ criteria[:data_response] = :retrieve_school_data_response
10
+ criteria[:data_result] = :retrieve_school_data_result
11
+ criteria[:data_types] = :schools
12
+ criteria[:data_type] = :school
13
+ @criteria = criteria
14
+ super(@criteria)
15
+ end
16
+
17
+ def display(school_data)
18
+
19
+ if school_data.is_a?(Array)
20
+ school_data.each do |item|
21
+ item.each do |key, value|
22
+ puts "#{key}: #{value}"
23
+ end
24
+ puts "\n"
25
+ end
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ if __FILE__ == $0
34
+ school = NwmlsClient::School.new()
35
+ data = school.retrieve_data
36
+ #puts "#{data}"
37
+ school.display(data)
38
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Timeshare < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "TSHR"
9
+ criteria[:property_type] = :time_share
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+ if __FILE__ == $0
19
+ time_share = NwmlsClient::Timeshare.new()
20
+ listings = time_share.retrieve_data
21
+ time_share.display(listings)
22
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "listing"
2
+
3
+ module NwmlsClient
4
+
5
+ class Vacantland < Listing
6
+
7
+ def initialize(criteria = {})
8
+ criteria[:property_code] = "VACL"
9
+ criteria[:property_type] = :vacant_land
10
+ @criteria = criteria
11
+ super(@criteria)
12
+ end
13
+
14
+ end
15
+
16
+ end
17
+
18
+
19
+ if __FILE__ == $0
20
+ vacant_land = NwmlsClient::Vacantland.new()
21
+ listings = vacant_land.retrieve_data
22
+ vacant_land.display(listings)
23
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nwmls_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - TJ Flynn
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: savon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ description: |+
28
+ NwmlsClient
29
+
30
+ Connects to the NWMLS Evernet Service and obtains listing data and images.
31
+
32
+ email: tjflynn1014@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - LICENSE
38
+ - README
39
+ - lib/nwmls_client/amenity.rb
40
+ - lib/nwmls_client/amenity.yml
41
+ - lib/nwmls_client/business.rb
42
+ - lib/nwmls_client/codes.rb
43
+ - lib/nwmls_client/commercial.rb
44
+ - lib/nwmls_client/community.rb
45
+ - lib/nwmls_client/condominium.rb
46
+ - lib/nwmls_client/farmranch.rb
47
+ - lib/nwmls_client/history.rb
48
+ - lib/nwmls_client/image.rb
49
+ - lib/nwmls_client/image_data.rb
50
+ - lib/nwmls_client/listing.rb
51
+ - lib/nwmls_client/manufactured.rb
52
+ - lib/nwmls_client/member.rb
53
+ - lib/nwmls_client/multifamily.rb
54
+ - lib/nwmls_client/office.rb
55
+ - lib/nwmls_client/rental.rb
56
+ - lib/nwmls_client/residential.rb
57
+ - lib/nwmls_client/school.rb
58
+ - lib/nwmls_client/timeshare.rb
59
+ - lib/nwmls_client/vacantland.rb
60
+ homepage: http://tbd.com
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '2.0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.5.1
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: NwmslClient provides access to NWMLS to obtain listing data and images
84
+ test_files: []