Пример #1
0
        //helper print methods
        private void AddNoteToListing()
        {
            try
            {
                Console.Write("{0}{0}Enter ID of the member you want to blacklist :{0}", Environment.NewLine);

                var readLine = Console.ReadLine();
                if (readLine != null)
                {
                    var memberId = Int32.Parse(readLine.Trim());
                    var request = new BlacklistRequest { MemberId = memberId, MemberIdSpecified = true };

                    var result = client.AddMemberToBlackList(request);

                }
            }
            catch (Exception e)
            {
                Console.Write("Exception occured: " + e);
            }

            Start();
        }
Пример #2
0
        /// <summary>
        /// <para>Adds a member to the authenticated user’s blacklist. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">BlacklistRequest</param>
        /// <returns>XDocument: BlacklistResponse.</returns>
        public XDocument AddMemberToBlackList(BlacklistRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.AddMemberToBlackList(request);
        }
 /// <summary>
 /// <para>Adds a member to the authenticated user’s blacklist. POST
 /// </para>
 /// REQUIRES AUTHENTICATION.
 /// </summary>
 /// <param name="request">BlacklistRequest</param>
 /// <returns>XDocument: BlacklistResponse.</returns>
 public XDocument AddMemberToBlackList(BlacklistRequest request)
 {
     var query = String.Format(Constants.Culture, "{0}/Blacklist/Add{1}", Constants.MY_TRADEME, Constants.XML);
     return _connection.Post(request, query, true);
 }