/// <summary> /// <para>Performs the My Trade Me Method: /// Retrieve a member’s watchlist. /// </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>Watchlist.</returns> public Watchlist Watchlist(WatchlistCriteria criteria, string page, string rows) { var query = String.Format(Constants.Culture, "{0}/{1}", Constants.MY_TRADEME, Constants.WATCHLIST); var conditions = "?"; _addAnd = false; if (!string.IsNullOrEmpty(string.Empty + criteria)) { query += "/" + criteria; } query += Constants.XML; conditions += SearchMethods.PageAndRowsHelper(page, rows, _addAnd); if (_addAnd) { query += conditions; } return(this.Watchlist(query)); }
/// <summary> /// <para>Performs the My Trade Me Method: /// Retrieve a member’s watchlist. /// </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>Watchlist.</returns> public Watchlist Watchlist(WatchlistCriteria criteria, string page, string rows) { if (_myTradeMe == null) { _myTradeMe = new MyTradeMeMethods(_connection); } return _myTradeMe.Watchlist(criteria, page, rows); }
/// <summary> /// <para>Performs the My Trade Me Method: /// Retrieve a member’s watchlist. /// </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>Watchlist.</returns> public Watchlist Watchlist(WatchlistCriteria criteria, string page, string rows) { var query = String.Format(Constants.Culture, "{0}/{1}", Constants.MY_TRADEME, Constants.WATCHLIST); var conditions = "?"; _addAnd = false; if (!string.IsNullOrEmpty(string.Empty + criteria)) { query += "/" + criteria; } query += Constants.XML; conditions += SearchMethods.PageAndRowsHelper(page, rows, _addAnd); if (_addAnd) { query += conditions; } return this.Watchlist(query); }