Example #1
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of sold items.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">	Number of rows per page.</param>
        /// <returns>SoldItems.</returns>
        public SoldItems SoldItems(SoldItemsCriteria criteria, string page, string rows)
        {
            var query      = Constants.MY_TRADEME + "/SoldItems";
            var conditions = "?";

            _addAnd = false;

            if (!string.IsNullOrEmpty(string.Empty + criteria))
            {
                query += "/" + criteria;
            }

            query += Constants.XML;

            conditions += SearchMethods.PageAndRowsHelper(page, rows, _addAnd);

            if (conditions.Equals("?"))
            {
                query += conditions;
            }

            return(this.SoldItems(query));
        }
Example #2
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of sold items.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">	Number of rows per page.</param>
        /// <returns>SoldItems.</returns>
        public SoldItems SoldItems(SoldItemsCriteria criteria, string page, string rows)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SoldItems(criteria, page, rows);
        }
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of sold items.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">	Number of rows per page.</param>
        /// <returns>SoldItems.</returns>
        public SoldItems SoldItems(SoldItemsCriteria criteria, string page, string rows)
        {
            var query = Constants.MY_TRADEME + "/SoldItems";
            var conditions = "?";
            _addAnd = false;

            if (!string.IsNullOrEmpty(string.Empty + criteria))
            {
                query += "/" + criteria;
            }

            query += Constants.XML;

            conditions += SearchMethods.PageAndRowsHelper(page, rows, _addAnd);

            if (conditions.Equals("?"))
            {
                query += conditions;
            }

            return this.SoldItems(query);
        }