The SearchMethods class contains the methods requried for making calls to the API related to searching.
Esempio n. 1
0
        /// <summary>
        /// <para>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.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">	Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="usage">The usage of the property.</param>
        /// <returns>Properties.</returns>
        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)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchRuralProperties(searchString, sortOrder, page, rows, region, district, suburb, dateFrom, priceMin, priceMax, landAreaMin, landAreaMax, usage);
        }
Esempio n. 2
0
        /// <summary>
        /// <para>Performs the membership method:
        /// Retrieve a member’s profile data
        /// using the "query" string provided - should be the  "Member/{member_id}/Profile.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">The string to search for.</param>
        /// <param name="page">The page number you would like to retrieve.</param>
        /// <param name="category">The category the search is in.</param>
        /// <param name="storeType">The type of store.</param>
        /// <returns>Stores</returns>
        public Stores SearchStores(string searchString = "", int page = 1, string category = "", StoreType storeType = StoreType.Normal)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchStores(searchString, page, category, storeType);
        }
Esempio n. 3
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Retirement Villages
        /// using the "query" string provided - should be the  "Search/Retirement.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>RetirementVillages.</returns>
        public RetirementVillages SearchRetirementVillages(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchRetirementVillages(query);
        }
Esempio n. 4
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Retirement Villages.
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="bathroomsMin">Minimum number of bathrooms..</param>
        /// <param name="bathroomsMax">Maximum number of bathrooms.</param>
        /// <param name="areaMin">	Minimum floor area in square meters.</param>
        /// <param name="areaMax">	Maximum square area in square meters.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="propertyType">The property type.</param>
        /// <param name="bedroomsMin">Minimum number of bedrooms.</param>
        /// <param name="bedroomsMax">Maximum number of bedrooms.</param>
        /// <returns>RetirementVillages.</returns>
        public RetirementVillages SearchRetirementVillages(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? bathroomsMin,
            int? bathroomsMax,
            int? areaMin,
            int? areaMax,
            int? landAreaMin,
            int? landAreaMax,
            RetirementVillagePropertyType propertyType,
            int? bedroomsMin,
            int? bedroomsMax)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchRetirementVillages(searchString, sortOrder, page, rows, region, district, suburb, dateFrom, priceMin, priceMax, bathroomsMin, bathroomsMax, areaMin, areaMax, landAreaMin, landAreaMax, propertyType, bedroomsMin, bedroomsMax);
        }
Esempio n. 5
0
        // general property search
        /// <summary>
        /// <para>Performs the Search Methods:
        /// Search Residential Property,
        /// Search Residential Rental Property,
        /// Residential Open Homes,
        /// Search Commercial Property,
        /// Search Commercial Lease Property,
        /// Search Rural Property,
        /// Search Lifestyle Property,
        /// Search Retirement Villages,
        /// </para><para>
        /// using the "query" string provided - should be the  "Search/Property/Retirement.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/". 
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>Properties.</returns>
        public global::Properties SearchProperties(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchProperties(query);
        }
Esempio n. 6
0
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Residential Rental Property.
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <param name="bathroomsMin">Minimum number of bathrooms.</param>
        /// <param name="bathroomsMax">Maximum number of bathrooms.</param>
        /// <param name="bedroomsMin">Minimum number of bedrooms.</param>
        /// <param name="bedroomsMax">Maximum number of bedrooms.</param>
        /// <param name="areaMax">Maximum square area in square meters.</param>
        /// <param name="areaMin">Minimum floor area in square meters.</param>
        /// <param name="landAreaMin">Minimum land area in square meters.</param>
        /// <param name="landAreaMax">Maximum land area in square meters.</param>
        /// <param name="propertyType">The type of the property.</param>
        /// <param name="adjacentSuburbs">Indicates whether the search should include listings in adjacent suburbs.</param>
        /// <returns>Properties.</returns>
        public global::Properties SearchResidentialRentalProperties(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax,
            int? bathroomsMin,
            int? bathroomsMax,
            int? bedroomsMin,
            int? bedroomsMax,
            int? areaMax,
            int? areaMin,
            int? landAreaMin,
            int? landAreaMax,
            PropertyType propertyType,
            bool? adjacentSuburbs)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchResidentialRentalProperties(searchString, sortOrder, page, rows, region, district, suburb, dateFrom, priceMin, priceMax, bathroomsMin, bathroomsMax, bedroomsMin, bedroomsMax, areaMax, areaMin, landAreaMin, landAreaMax, propertyType, adjacentSuburbs);
        }
Esempio n. 7
0
        // motor boat search
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Motor Boats</para>
        /// <para>using the "query" string provided - should be the  &quot;Search/Motors/Boats.xml?length_max=5000&amp;type=inflatable&quot; part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>MotorBoats.</returns>
        public MotorBoats SearchMotorBoats(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchMotorBoats(query);
        }
Esempio n. 8
0
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search for Flatmate
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <param name="region">Specifies the search region ID.</param>
        /// <param name="district">Specifies the search district ID.</param>
        /// <param name="suburb">Specifies the search suburb ID.</param>
        /// <param name="dateFrom">Specifies minimum start date for returned listings.</param>
        /// <param name="priceMin">Minimum property price.</param>
        /// <param name="priceMax">Maximum property price.</param>
        /// <returns>Flatmates.</returns>
        public Flatmates SearchFlatmates(
            string searchString,
            PropertySortOrder sortOrder,
            int? page,
            int? rows,
            int? region,
            int? district,
            int? suburb,
            DateTime dateFrom,
            int? priceMin,
            int? priceMax)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchFlatmates(searchString, sortOrder, page, rows, region, district, suburb, dateFrom, priceMin, priceMax);
        }
Esempio n. 9
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Jobs.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="salaryMin">Minimum salary.</param>
        /// <param name="salaryMax">Maximum salary.</param>
        /// <param name="region">Job offer region.</param>
        /// <param name="district">Job offer district.</param>
        /// <param name="type">Type of position.</param>
        /// <param name="category">Category.</param>
        /// <param name="subcategory">Subcategory.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>Jobs.</returns>
        public Jobs SearchJobs(
            string searchString,
            SortOrder sortOrder,
            decimal salaryMin,
            decimal salaryMax,
            string region,
            string district,
            JobType type,
            string category,
            string subcategory,
            int? page,
            int? rows)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchJobs(searchString, sortOrder, salaryMin, salaryMax, region, district, type, category, subcategory, page, rows);
        }
Esempio n. 10
0
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Motor Bikes.
        /// It creates the query string using the paramaters - can be null if the parameter is not required for the request. 
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="priceMin">Minimum price.</param>
        /// <param name="priceMax">Maximum price.</param>
        /// <param name="make">	Motorbike make.</param>
        /// <param name="type">Type of the Motor Bike.</param>
        /// <param name="yearMin">	Minimum year of manufacture.</param>
        /// <param name="yearMax">Maximum year of manufacture.</param>
        /// <param name="energySizeMin">Minimum engine size in cubic centimetres (e.g. 2000 for 2 litre engine).</param>
        /// <param name="energySizeMax">Maximum engine size.</param>
        /// <param name="dateFrom">Return only listings started from this date.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>MotorBikes.</returns>
        public MotorBikes SearchMotorBikes(
            string searchString,
            SortOrder sortOrder,
            decimal priceMin,
            decimal priceMax,
            string make,
            BikeType type,
            int? yearMin,
            int? yearMax,
            int? energySizeMin,
            int? energySizeMax,
            DateTime dateFrom,
            int? page,
            int? rows)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchMotorBikes(searchString, sortOrder, priceMin, priceMax, make, type, yearMin, yearMax, energySizeMin, energySizeMax, dateFrom, page, rows);
        }
Esempio n. 11
0
        /// <summary>
        /// <para>Performs the search method:
        /// Search Jobs</para><para>
        /// using the "query" string provided - should be the  "Search/Jobs.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>Jobs.</returns>
        public Jobs SearchJobs(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchJobs(query);
        }
Esempio n. 12
0
        /// <summary>
        /// <para>Performs Search method:
        /// Search General
        /// using the query paramaters provided it will construct a query string for you - can use null if the parameter is not required for your request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="category">Specifies the category in which you want to perform the search.</param>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="userRegion">Restricts search results to items from sellers located in the specified region.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="buy">Return only listings with BuyNow price.</param>
        /// <param name="pay">Return only listings with PayNow.</param>
        /// <param name="condition">Filter listings by condition.</param>
        /// <param name="dateFrom">Return only listings started from this date.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">	Number of rows per page.</param>
        /// <param name="memberListing">Returns only listing from specified member ID.</param>
        /// <returns>SearchResults.</returns>
        public SearchResults SearchGeneral(
            string category,
            string searchString,
            int? userRegion,
            SortOrder sortOrder,
            bool? buy,
            bool? pay,
            Condition condition,
            DateTime dateFrom,
            int? page,
            int? rows,
            int? memberListing)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchGeneral(category, searchString, userRegion, sortOrder, buy, pay, condition, dateFrom, page, rows, memberListing);
        }
Esempio n. 13
0
        // Search Methods:
        // general search
        /// <summary>
        /// <para>Performs Search method:
        /// Search General
        /// using the "query" string provided - should be the  "Search/General.xml?search_string=Playstation" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>SearchResults.</returns>
        public SearchResults SearchGeneral(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchGeneral(query);
        }
Esempio n. 14
0
        // car search
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Used Motors
        /// using the "query" string provided - should be the  "Search/Motors/Used.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API with.</param>
        /// <returns>Cars.</returns>
        public Cars SearchUsedMotors(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchUsedMotors(query);
        }
Esempio n. 15
0
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Motor Boats
        /// using the parameters provided - can use null if the parameter is not required.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="priceMin">Minimum price.</param>
        /// <param name="priceMax">Maximum price.</param>
        /// <param name="type">Type of the Motor Boat.</param>
        /// <param name="lengthMin">Minimum length of a boat in metres.</param>
        /// <param name="lengthMax">Maximum length of a boat in metres.</param>
        /// <param name="dateFrom">Return only listings started from this date.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>MotorBoats.</returns>
        public MotorBoats SearchMotorBoats(string searchString, SortOrder sortOrder, decimal priceMin, decimal priceMax, BoatType type, int? lengthMin, int? lengthMax, DateTime dateFrom, int? page, int? rows)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchMotorBoats(searchString, sortOrder, priceMin, priceMax, type, lengthMin, lengthMax, dateFrom, page, rows);
        }
Esempio n. 16
0
        // car search
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search Used Motors.
        /// Creates a query string based on the parameters provided, can be null if the parameter is not required for the request.
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="searchString">One or more keywords to use in a search query.</param>
        /// <param name="userRegion">Restricts search results to items from sellers located in the specified region.</param>
        /// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
        /// <param name="priceMin">Minimum price.</param>
        /// <param name="priceMax">Maximum price.</param>
        /// <param name="make">Car make.</param>
        /// <param name="model">Car model.</param>
        /// <param name="bodyStyle">Car body style.</param>
        /// <param name="doorsMin">Minimum number of doors (range from 2 to 5).</param>
        /// <param name="doorsMax">Maximum number of doors. </param>
        /// <param name="transmission">Transmission type.</param>
        /// <param name="yearMax">Maximum year of manufacture.</param>
        /// <param name="yearMin">Minimum year of manufacture.</param>
        /// <param name="energySizeMin">Minimum engine size in cubic centimetres (e.g. 2000 for 2 litre engine). </param>
        /// <param name="energySizeMax">Maximum engine size.</param>
        /// <param name="odometerMin">	Minimum odometer value in kilometres.</param>
        /// <param name="odometerMax">Maximum odometer value.</param>
        /// <param name="listingType">Type of listing.</param>
        /// <param name="dateFrom">Return only listings started from this date.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>Cars.</returns>
        public Cars SearchUsedMotors(
            string searchString,
            int? userRegion,
            SortOrder sortOrder,
            decimal priceMin,
            decimal priceMax,
            string make,
            string model,
            BodyStyle bodyStyle,
            int? doorsMin,
            int? doorsMax,
            Transmission transmission,
            int? yearMax,
            int? yearMin,
            int? energySizeMin,
            int? energySizeMax,
            int? odometerMin,
            int? odometerMax,
            ListingType listingType,
            DateTime dateFrom,
            int? page,
            int? rows)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchUsedMotors(searchString, userRegion, sortOrder, priceMin, priceMax, make, model, bodyStyle, doorsMin, doorsMax, transmission, yearMax, yearMin, energySizeMin, energySizeMax, odometerMin, odometerMax, listingType, dateFrom, page, rows);
        }
Esempio n. 17
0
        // flatmate search
        /// <summary>
        /// <para>Performs the Search Method:
        /// Search for Flatmate
        /// using the "query" string provided - should be the  "Search/Flatmates.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// DOES NOT REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>Flatmates.</returns>
        public Flatmates SearchFlatmates(string query)
        {
            if (_search == null)
            {
                _search = new SearchMethods(_connection);
            }

            return _search.SearchFlatmates(query);
        }