Пример #1
0
        /// <summary>
        /// <para>Performs the Listing Method:
        /// Provide an answer for a specific question.
        /// </para><para>
        /// Serializes the given ListingAnswerQuestion into xml.
        /// Creates a query string using the parameters provided.
        /// </para><para>
        /// All the parameters are required.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="answerQuestion">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <param name="listingId">The id of the listing that has the question being answered.</param>
        /// <param name="questionId">The id of the question being answered.</param>
        /// <returns>XDocument.</returns>
        public XDocument AnswerSpecificQuestion(ListingAnswerQuestion answerQuestion, string listingId, string questionId)
        {
            if (_listing == null)
            {
                _listing = new ListingMethods(_connection);
            }

            return _listing.AnswerSpecificQuestion(answerQuestion, listingId, questionId);
        }
 /// <summary>
 /// <para>Performs the Listing Method:
 /// Provide an answer for a specific question. POST
 /// </para><para>
 /// Serializes the given ListingAnswerQuestion into xml.
 /// Creates a query string using the parameters provided.
 /// </para><para>
 /// All the parameters are required.
 /// </para>
 /// REQUIRES AUTHENTICATION.
 /// </summary>
 /// <param name="answerQuestion">The object that will be serialized into xml and then sent in a POST message.</param>
 /// <param name="listingId">The id of the listing that has the question being answered.</param>
 /// <param name="questionId">The id of the question being answered.</param>
 /// <returns>XDocument.</returns>
 public XDocument AnswerSpecificQuestion(ListingAnswerQuestion answerQuestion, string listingId, string questionId)
 {
     var query = String.Format(Constants.Culture, "{0}/{1}/{2}/{3}/answerquestion{4}", Constants.LISTINGS, listingId, Constants.QUESTIONS, questionId, Constants.XML);
     return _connection.Post(answerQuestion, query);
 }
Пример #3
0
        /// <summary>
        /// <para>Performs the Listing Method:
        /// Provide an answer for a specific question. POST
        /// </para><para>
        /// Serializes the given ListingAnswerQuestion into xml.
        /// Creates a query string using the parameters provided.
        /// </para><para>
        /// All the parameters are required.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="answerQuestion">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <param name="listingId">The id of the listing that has the question being answered.</param>
        /// <param name="questionId">The id of the question being answered.</param>
        /// <returns>XDocument.</returns>
        public XDocument AnswerSpecificQuestion(ListingAnswerQuestion answerQuestion, string listingId, string questionId)
        {
            var query = String.Format(Constants.Culture, "{0}/{1}/{2}/{3}/answerquestion{4}", Constants.LISTINGS, listingId, Constants.QUESTIONS, questionId, Constants.XML);

            return(_connection.Post(answerQuestion, query));
        }