Exemple #1
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of won 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>WonItems.</returns>
        public WonItems WonItems(WonItemsCriteria criteria, string page, string rows)
        {
            var query      = Constants.MY_TRADEME + "/Won";
            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.WonItems(query));
        }
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of won 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>WonItems.</returns>
        public WonItems WonItems(WonItemsCriteria criteria, string page, string rows)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.WonItems(criteria, page, rows);
        }
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of won 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>WonItems.</returns>
        public WonItems WonItems(WonItemsCriteria criteria, string page, string rows)
        {
            var query = Constants.MY_TRADEME + "/Won";
            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.WonItems(query);
        }