Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  lib
  CHANGELOG.md
  MIT-LICENSE
  README.md
  Rakefile
Size: Mime:
  README.md

Overview

Simplifies the process of dealing with RETS servers. Without having to worry about the various authentication methods or edge cases associated with dealing with RETS. Should work against all 1.x implementations.

Compability

Tested against Ruby 1.9.3, 2.0.0, RBX and JRuby, build history is available here.

Documentation

See http://rubydoc.info/github/Placester/ruby-rets/master/frames for full documentation.

Examples

client = RETS::Client.login(:url => "http://foobar.com/rets/Login", :username => "foo", :password => "bar")
client.search(:search_type => :Property, :class => :RES, :query => "(ListPrice=50000-)") do |data|
  # RETS data in key/value format, as COMPACT-DECODED
end

client.get_object(:resource => :Property, :type => :Photo, :location => false, :id => "1:0:*") do |headers, content|
  puts "Object-ID #{headers"object-id"]}, Content-ID #{headers["content-id"]}, Description #{["description"]}"
  puts "Data"
  puts content
end

VCR / WebMock

Due to the streaming parser, the search features won't work with a library like VCR or Ephemeral Response. For WebMock, you can use the below patch to enable support for saving the HTTP requests to speed up your own tests.

module Net
    module WebMockHTTPResponse
        def self.extended(response)
            response.instance_variable_set(:@socket, StringIO.new(response.body))
        end
    end
end

License

Licensed under MIT

Ruby gem used by RC: GIT remote: git@github.com:Placester/Data-Listing-Database-Lib-Legacy.git revision: a07fd5e12087d36741b1aaab240e9b4da85ed63b specs: mongoid (2.5.1) activemodel (> 3.1) mongo (> 1.8) tzinfo (~> 0.3.22)

GIT remote: git@github.com:Placester/Data-Listing-Import-RETS-Ruby-Lib-Legacy.git revision: 0f32f33047c9d3814d431b8b97478a39ce2ce3ce specs: ruby-rets (2.0.7) nokogiri (>= 1.5.0)

GIT remote: git@github.com:Placester/Data-Listing-Worker-Limiter-Legacy.git revision: 13d9b0bda2d4b2c7017e099f598f4aaf673341d6 specs: resque-concurrency-limiter (0.0.1) resque (>= 1.20.0)

GIT remote: git@github.com:Placester/Data-Listing-Worker-Lock-Legacy.git revision: e83788390566da4bc817252fd71c9961a1a6f17b specs: resque-lock (1.0.0)

GIT remote: git@github.com:Placester/Data-Listing-Worker-Status-Legacy.git revision: d2c4d89213b156a3fcc961c1ac13d92e77cc040a specs: resque-status (0.4.1) resque (>= 1.19)