C# Class TradeMe.Api.Client.ListingMethods

The ListingMethods class contains the methods requried for making calls to the API related to Listings.
Afficher le fichier Open project: TradeMe/trade-me-api-wrapper Class Usage Examples

Méthodes publiques

Méthode Description
AnswerSpecificQuestion ( ListingAnswerQuestion answerQuestion, string listingId, string questionId ) : System.Xml.Linq.XDocument

Performs the Listing Method: Provide an answer for a specific question. POST

Serializes the given ListingAnswerQuestion into xml. Creates a query string using the parameters provided.

All the parameters are required.

REQUIRES AUTHENTICATION.

CommentOnListing ( ListingAddComment addComment, string listingId ) : System.Xml.Linq.XDocument

Performs the Listing Method: Post a comment on a listing.

Serializes the given ListingAddComment into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.

EmailFriend ( EmailFriendRequest email, string listingId ) : System.Xml.Linq.XDocument

Performs the Listing Method: Send an email regarding an auction to a friend.

Serializes the given EmailFriendRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.

EmailSellerOfClassified ( EmailRequest emailRequest, string listingId ) : System.Xml.Linq.XDocument

Performs the Listing Method: Send an email to the seller of a classified.

Serializes the given EmailRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.

GetClosingSoonListings ( ) : ClosingSoonListings

Performs the Listing Method: Retrieves the items closing soon for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.

GetFeaturedListings ( ) : FeaturedListings

Performs the Listing Method: Retrieves the featured listings for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.

GetHotListings ( ) : HotListings

Performs the Listing Method: Retrieves the hot items for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.

GetLatestListings ( ) : LatestListings

Performs the Listing Method: Retrieves the latest listed items for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.

GetOneDollarListings ( ) : OneDollarListings

Performs the Listing Method: Retrieves the items with one dollar reserves for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.

ListingDetail ( string query ) : ListedItemDetail

Performs the Listing Method: Retrieve the details of a single listing

using the "query" string provided - should be the "Listings/{listing_id}.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

DOES NOT REQUIRE AUTHENTICATION.

ListingDetailById ( string id ) : ListedItemDetail

Performs the Listing Method: Retrieve the details of a single listing.

Creates a query string using the listing id parameter provided.

DOES NOT REQUIRE AUTHENTICATION.

ListingMethods ( ConnectionMethods connect ) : System

Initializes a new instance of the ListingMethods class.

SendComplaint ( ComplaintRequest complaintRequest, string listingId ) : XDocument

Performs the Listing Method: Sends a complaint about a listing to the Trade Me customer service team.

Serializes the given ComplaintRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.

UnansweredQuestionsAll ( ) : Questions

Performs the Listing Method: Retrieves a list of all the unanswered questions for all live auctions of the authenticated user. GET

REQUIRES AUTHENTICATION.

UnansweredQuestionsById ( string listingId ) : Questions

Performs the Listing Method: Retrieve a list of unanswered questions for all listings belonging to a member, Retrieve a list of unanswered questions on a single listing.

Creates a query string using the id parameter provided - the parameter should be null if the request is for all listings belonging to a member.

REQUIRES AUTHENTICATION.

UnansweredQuestionsByQueryString ( string query ) : Questions

Performs the Listing Method: Retrieve a list of unanswered questions for all listings belonging to a member, Retrieve a list of unanswered questions on a single listing,

using the "query" string provided - should be the "Listings/questions/unansweredquestions.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.

Private Methods

Méthode Description
ListedItemDetailConnectionHelper ( string url ) : ListedItemDetail

A helper method for performing the http request for ListedItemDetail requests.

Method Details

AnswerSpecificQuestion() public méthode

Performs the Listing Method: Provide an answer for a specific question. POST

Serializes the given ListingAnswerQuestion into xml. Creates a query string using the parameters provided.

All the parameters are required.

REQUIRES AUTHENTICATION.
public AnswerSpecificQuestion ( ListingAnswerQuestion answerQuestion, string listingId, string questionId ) : System.Xml.Linq.XDocument
answerQuestion ListingAnswerQuestion The object that will be serialized into xml and then sent in a POST message.
listingId string The id of the listing that has the question being answered.
questionId string The id of the question being answered.
Résultat System.Xml.Linq.XDocument

CommentOnListing() public méthode

Performs the Listing Method: Post a comment on a listing.

Serializes the given ListingAddComment into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.
public CommentOnListing ( ListingAddComment addComment, string listingId ) : System.Xml.Linq.XDocument
addComment ListingAddComment The object that will be serialized into xml and then sent in a POST message.
listingId string The id of the listing the comment should be added to.
Résultat System.Xml.Linq.XDocument

EmailFriend() public méthode

Performs the Listing Method: Send an email regarding an auction to a friend.

Serializes the given EmailFriendRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.
public EmailFriend ( EmailFriendRequest email, string listingId ) : System.Xml.Linq.XDocument
email EmailFriendRequest The object that will be serialized into xml and then sent in a POST message.
listingId string The id of the listing you want to email about.
Résultat System.Xml.Linq.XDocument

EmailSellerOfClassified() public méthode

Performs the Listing Method: Send an email to the seller of a classified.

Serializes the given EmailRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.
public EmailSellerOfClassified ( EmailRequest emailRequest, string listingId ) : System.Xml.Linq.XDocument
emailRequest EmailRequest The object that will be serialized into xml and then sent in a POST message.
listingId string The id of the listing that youwant to email about.
Résultat System.Xml.Linq.XDocument

GetClosingSoonListings() public méthode

Performs the Listing Method: Retrieves the items closing soon for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.
public GetClosingSoonListings ( ) : ClosingSoonListings
Résultat ClosingSoonListings

GetFeaturedListings() public méthode

Performs the Listing Method: Retrieves the featured listings for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.
public GetFeaturedListings ( ) : FeaturedListings
Résultat FeaturedListings

GetHotListings() public méthode

Performs the Listing Method: Retrieves the hot items for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.
public GetHotListings ( ) : HotListings
Résultat HotListings

GetLatestListings() public méthode

Performs the Listing Method: Retrieves the latest listed items for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.
public GetLatestListings ( ) : LatestListings
Résultat LatestListings

GetOneDollarListings() public méthode

Performs the Listing Method: Retrieves the items with one dollar reserves for the whole country or for a single region. GET

DOES NOT REQUIRE AUTHENTICATION.
public GetOneDollarListings ( ) : OneDollarListings
Résultat OneDollarListings

ListingDetail() public méthode

Performs the Listing Method: Retrieve the details of a single listing

using the "query" string provided - should be the "Listings/{listing_id}.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

DOES NOT REQUIRE AUTHENTICATION.
public ListingDetail ( string query ) : ListedItemDetail
query string The query string that will be added to the base url and used to connect to the API with.
Résultat ListedItemDetail

ListingDetailById() public méthode

Performs the Listing Method: Retrieve the details of a single listing.

Creates a query string using the listing id parameter provided.

DOES NOT REQUIRE AUTHENTICATION.
public ListingDetailById ( string id ) : ListedItemDetail
id string The listing id.
Résultat ListedItemDetail

ListingMethods() public méthode

Initializes a new instance of the ListingMethods class.
public ListingMethods ( ConnectionMethods connect ) : System
connect ConnectionMethods A ConnectionMethods class used to make calls to the API
Résultat System

SendComplaint() public méthode

Performs the Listing Method: Sends a complaint about a listing to the Trade Me customer service team.

Serializes the given ComplaintRequest into xml. Creates a query string using the listingId provided .

All the parameters are required.

REQUIRES AUTHENTICATION.
public SendComplaint ( ComplaintRequest complaintRequest, string listingId ) : XDocument
complaintRequest ComplaintRequest The object that will be serialized into xml and then sent in a POST message.
listingId string The id of the listing that youwant to complain about.
Résultat XDocument

UnansweredQuestionsAll() public méthode

Performs the Listing Method: Retrieves a list of all the unanswered questions for all live auctions of the authenticated user. GET

REQUIRES AUTHENTICATION.
public UnansweredQuestionsAll ( ) : Questions
Résultat Questions

UnansweredQuestionsById() public méthode

Performs the Listing Method: Retrieve a list of unanswered questions for all listings belonging to a member, Retrieve a list of unanswered questions on a single listing.

Creates a query string using the id parameter provided - the parameter should be null if the request is for all listings belonging to a member.

REQUIRES AUTHENTICATION.
public UnansweredQuestionsById ( string listingId ) : Questions
listingId string The listing id.
Résultat Questions

UnansweredQuestionsByQueryString() public méthode

Performs the Listing Method: Retrieve a list of unanswered questions for all listings belonging to a member, Retrieve a list of unanswered questions on a single listing,

using the "query" string provided - should be the "Listings/questions/unansweredquestions.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.
public UnansweredQuestionsByQueryString ( string query ) : Questions
query string The query string that will be added to the base url and used to connect to the API.
Résultat Questions