TradeMe.Api.Client.SearchMethods.SearchRuralProperties C# (CSharp) Method

SearchRuralProperties() public method

Performs the search method: Search Rural Property. Creates a query string using the parameters provided - parameters can be null if they are not required for the request.

DOES NOT REQUIRE AUTHENTICATION.
public SearchRuralProperties ( string searchString, PropertySortOrder sortOrder, int page, int rows, int region, int district, int suburb, System.DateTime dateFrom, int priceMin, int priceMax, int landAreaMin, int landAreaMax, RuralPropertyUsage usage ) : global::Properties
searchString string One or more keywords to use in a search query.
sortOrder PropertySortOrder Sort the returned record-set by a single specified sort order.
page int Page number.
rows int Number of rows per page.
region int Specifies the search region ID.
district int Specifies the search district ID.
suburb int Specifies the search suburb ID.
dateFrom System.DateTime Specifies minimum start date for returned listings.
priceMin int Minimum property price.
priceMax int Maximum property price.
landAreaMin int Minimum land area in square meters.
landAreaMax int Maximum land area in square meters.
usage RuralPropertyUsage The usage of the property.
return global::Properties
        public global::Properties SearchRuralProperties(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? landAreaMin,
            int? landAreaMax,
            RuralPropertyUsage usage)
        {
            var url = String.Format(Constants.Culture, "{0}{1}/{2}/Rural{3}", _connection.BaseUrl, Constants.SEARCH, Constants.PROPERTY, Constants.XML);
            _addAnd = false;
            var conditions = "?";

            // create the parameters for the query string
            conditions += this.RuralPropertiesHelper(
                searchString,
                sortOrder.ToString(),
                page,
                rows,
                region,
                district,
                suburb,
                dateFrom,
                priceMin,
                priceMax,
                null,
                null,
                landAreaMin,
                landAreaMax,
                null,
                usage.ToString());

            // add the parameters to the query string if there are any
            if (conditions.Equals("?"))
            {
                url += conditions;
            }

            // perform the request
            return this.PropertyConnectionHelper(url);
        }