Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wku-ruby-rets

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wku-ruby-rets

  • 2.0.7
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc