lib/rets/client.rb
# Finds records.
#
# [quantity]  Return the first record, or an array of records.
#             Uses a symbol <tt>:first</tt> or <tt>:all</tt>, respectively.
#
# [opts]  A hash of arguments used to construct the search query,
#         using the following keys:
#
# <tt>:search_type</tt>::  Required. The resource to search for.
# <tt>:class</tt>::        Required. The class of the resource to search for.
# <tt>:query</tt>::        Required. The DMQL2 query string to execute.
# <tt>:limit</tt>::        The number of records to request from the server.
# <tt>:resolve</tt>::      Provide resolved values that use metadata instead
#                          of raw system values.
#
# Any other keys are converted to the RETS query format, and passed
# to the server as part of the query. For instance, the key <tt>:offset</tt>
# will be sent as +Offset+.
#
Finds records.
[quantity]  Return the first record, or an array of records.
Uses a symbol :first or :all, respectively.

[opts]  A hash of arguments used to construct the search query,
using the following keys.



Any other keys are converted to the RETS query format, and passed
to the server as part of the query. For instance, the key :offset
will be sent as +Offset+.
Finds records . [ quantity ] Return the first record or an array of records . Uses a symbol : first or : all respectively . [ opts ] A hash of arguments used to construct the search query using the following keys . Any other keys are converted to the RETS query format and passed to the server as part of the query . For instance the key : offset will be sent as + Offset + .
def find(quantity, opts = {})
      case quantity
        when :first  then find_with_retries(opts.merge(:limit => 1)).first
        when :all    then find_with_retries(opts)
        else raise ArgumentError, "First argument must be :first or :all"
      end
    end
def find ( quantity , opts = { } ) case quantity when :first then find_with_retries ( opts . merge ( :limit => 1 ) ) . first when :all then find_with_retries ( opts ) else raise ArgumentError , "First argument must be :first or :all" end end
Finds records.
Finds records .
quantity
opts