/// <summary> /// <para>Performs the Listing Method: /// Post a comment on a listing. /// </para><para> /// Serializes the given ListingAddComment into xml. /// Creates a query string using the listingId provided . /// </para><para> /// All the parameters are required. /// </para> /// REQUIRES AUTHENTICATION. /// </summary> /// <param name="addComment">The object that will be serialized into xml and then sent in a POST message.</param> /// <param name="listingId">The id of the listing the comment should be added to.</param> /// <returns>XDocument.</returns> public XDocument CommentOnListing(ListingAddComment addComment, string listingId) { if (_listing == null) { _listing = new ListingMethods(_connection); } return _listing.CommentOnListing(addComment, listingId); }
/// <summary> /// <para>Performs the Listing Method: /// Post a comment on a listing. /// </para><para> /// Serializes the given ListingAddComment into xml. /// Creates a query string using the listingId provided . /// </para><para> /// All the parameters are required. /// </para> /// REQUIRES AUTHENTICATION. /// </summary> /// <param name="addComment">The object that will be serialized into xml and then sent in a POST message.</param> /// <param name="listingId">The id of the listing the comment should be added to.</param> /// <returns>XDocument.</returns> public XDocument CommentOnListing(ListingAddComment addComment, string listingId) { var query = String.Format(Constants.Culture, "{0}/{1}/addcomment{2}", Constants.LISTINGS, listingId, Constants.XML); return _connection.Post(addComment, query); }
/// <summary> /// <para>Performs the Listing Method: /// Post a comment on a listing. /// </para><para> /// Serializes the given ListingAddComment into xml. /// Creates a query string using the listingId provided . /// </para><para> /// All the parameters are required. /// </para> /// REQUIRES AUTHENTICATION. /// </summary> /// <param name="addComment">The object that will be serialized into xml and then sent in a POST message.</param> /// <param name="listingId">The id of the listing the comment should be added to.</param> /// <returns>XDocument.</returns> public XDocument CommentOnListing(ListingAddComment addComment, string listingId) { var query = String.Format(Constants.Culture, "{0}/{1}/addcomment{2}", Constants.LISTINGS, listingId, Constants.XML); return(_connection.Post(addComment, query)); }