ExRets v0.1.1 ExRets.SearchArguments View Source

Arguments for a RETS Search Transaction.

Link to this section Summary

Types

Specifies the class of the resource to search. Required.

Controls whether the server's response includes a count.

Selects one of the three supported data return formats for the query response.

Requests the server to apply or suspend a limit on the number of records returned in the search.

Retrieve records beginning with the record number indicated, with a value of 1 indicating to start with the first record.

Request a specific XML format for the return set.

Query as specified by the language denoted in query_type.

Designates the query language used in query.

Used in place of withheld field values.

Specifies the resource to search. Required.

A comma-separated list of fields for the server to return.

Specifies whether to use standard names or system names.

t()

Arguments for a RETS Search Transaction.

Functions

Encodes search arguments t/0 into a query string.

Link to this section Types

Link to this type

class()

View Source (since 0.1.0)
class() :: String.t()

Specifies the class of the resource to search. Required.

Link to this type

count()

View Source (since 0.1.0)
count() :: :no_record_count | :include_record_count | :only_record_count

Controls whether the server's response includes a count.

Possible values:

  • :no_record_count - no record count returned
  • :include_record_count - record-count is returned in addition to the data
  • :only_record_count - only a record-count is returned; no data is returned
Link to this type

format()

View Source (since 0.1.0)
format() :: String.t()

Selects one of the three supported data return formats for the query response.

Possible values:

  • COMPACT
  • COMPACT-DECODED
  • STANDARD-XML
Link to this type

limit()

View Source (since 0.1.0)
limit() :: integer() | String.t()

Requests the server to apply or suspend a limit on the number of records returned in the search.

Link to this type

offset()

View Source (since 0.1.0)
offset() :: non_neg_integer()

Retrieve records beginning with the record number indicated, with a value of 1 indicating to start with the first record.

Link to this type

payload()

View Source (since 0.1.0)
payload() :: String.t() | nil

Request a specific XML format for the return set.

Only set payload OR format and optionally select.

Link to this type

query()

View Source (since 0.1.0)
query() :: String.t() | nil

Query as specified by the language denoted in query_type.

Link to this type

query_type()

View Source (since 0.1.0)
query_type() :: String.t() | nil

Designates the query language used in query.

Link to this type

restricted_indicator()

View Source (since 0.1.0)
restricted_indicator() :: String.t() | nil

Used in place of withheld field values.

Link to this type

search_type()

View Source (since 0.1.0)
search_type() :: String.t()

Specifies the resource to search. Required.

Link to this type

select()

View Source (since 0.1.0)
select() :: String.t() | nil

A comma-separated list of fields for the server to return.

Link to this type

standard_names()

View Source (since 0.1.0)
standard_names() :: boolean()

Specifies whether to use standard names or system names.

This argument affects to all names used in search_type, class, query, and select arguments.

Possible values:

  • false - system names
  • true - standard names
Link to this type

t()

View Source (since 0.1.0)
t() :: %ExRets.SearchArguments{
  class: class(),
  count: count(),
  format: format(),
  limit: limit(),
  offset: offset(),
  payload: payload(),
  query: query(),
  query_type: query_type(),
  restricted_indicator: restricted_indicator(),
  search_type: search_type(),
  select: select(),
  standard_names: standard_names()
}

Arguments for a RETS Search Transaction.

Link to this section Functions

Link to this function

encode_query(search_arguments)

View Source (since 0.1.0)
encode_query(search_arguments :: t()) :: String.t()

Encodes search arguments t/0 into a query string.

Examples

iex> search_arguments = %ExRets.SearchArguments{
...>   search_type: "Property",
...>   class: "Residential"
...> }
iex> ExRets.SearchArguments.encode_query(search_arguments)
"Class=Residential&Count=0&Format=COMPACT-DECODED&Limit=NONE&Offset=1&QueryType=DMQL2&SearchType=Property&StandardNames=0"