C# Class TradeMe.Api.Client.FavouriteMethods

The FavouriteMethods class contains the methods requried for making calls to the API related to Favourites.
显示文件 Open project: TradeMe/trade-me-api-wrapper Class Usage Examples

Public Methods

Method Description
FavouriteMethods ( ConnectionMethods connect ) : System

Initializes a new instance of the FavouriteMethods class.

RemoveSavedFavorite ( string favoriteId, string type ) : System.Xml.Linq.XDocument

Performs the Favourites method: Deletes a saved search, category or seller from the currently authenticated user’s favourites. DELETE

REQUIRES AUTHENTICATION.

RetrieveFavouriteCategories ( ) : SavedCategories

Performs the Favourites Method: Get Saved Categories. GET

REQUIRES AUTHENTICATION.

RetrieveFavouriteSearches ( SavedSearchType filter ) : SavedSearches

Performs the Favourites Method: Get Saved Searches. GET

REQURIES AUTHENTICATION.

RetrieveFavouriteSellers ( ) : SavedSellers

Performs the Favourites method: Get Saved Sellers. GET

REQUIRES AUTHENTICATION.

SaveCategory ( SaveCategoryRequest saveCategory ) : System.Xml.Linq.XDocument

Performs the Favourites method: Save Category. POST

Serializes the given SaveCategoryRequest into xml.

REQUIRES AUTHENTICATION.

SaveSearch ( SaveSearchRequest saveSearch ) : System.Xml.Linq.XDocument

Performs the Favourites method: Save Search. POST

Serializes the given SaveSearchRequest into xml.

REQUIRES AUTHENTICATION.

SaveSeller ( SaveSellerRequest saveSeller ) : System.Xml.Linq.XDocument

Performs the Favourites method: Save Seller. POST

Serializes the given SaveSellerRequest into xml.

REQUIRES AUTHENTICATION.

UpdateSavedFavorite ( string favoriteId, string type, string frequency ) : System.Xml.Linq.XDocument

Performs the Favourites method: Modifies the email frequency for a saved favourite. POST

REQUIRES AUTHENTICATION.

Method Details

FavouriteMethods() public method

Initializes a new instance of the FavouriteMethods class.
public FavouriteMethods ( ConnectionMethods connect ) : System
connect ConnectionMethods A ConnectionMethods class used to make calls to the API
return System

RemoveSavedFavorite() public method

Performs the Favourites method: Deletes a saved search, category or seller from the currently authenticated user’s favourites. DELETE

REQUIRES AUTHENTICATION.
public RemoveSavedFavorite ( string favoriteId, string type ) : System.Xml.Linq.XDocument
favoriteId string The ID of the favourite.
type string The type of favourite (must be “Category”, “Search”, “AttributeSearch” or “Seller”).
return System.Xml.Linq.XDocument

RetrieveFavouriteCategories() public method

Performs the Favourites Method: Get Saved Categories. GET

REQUIRES AUTHENTICATION.
public RetrieveFavouriteCategories ( ) : SavedCategories
return SavedCategories

RetrieveFavouriteSearches() public method

Performs the Favourites Method: Get Saved Searches. GET

REQURIES AUTHENTICATION.
public RetrieveFavouriteSearches ( SavedSearchType filter ) : SavedSearches
filter SavedSearchType
return SavedSearches

RetrieveFavouriteSellers() public method

Performs the Favourites method: Get Saved Sellers. GET

REQUIRES AUTHENTICATION.
public RetrieveFavouriteSellers ( ) : SavedSellers
return SavedSellers

SaveCategory() public method

Performs the Favourites method: Save Category. POST

Serializes the given SaveCategoryRequest into xml.

REQUIRES AUTHENTICATION.
public SaveCategory ( SaveCategoryRequest saveCategory ) : System.Xml.Linq.XDocument
saveCategory SaveCategoryRequest The object that will be serialized into xml and then sent in a POST message.
return System.Xml.Linq.XDocument

SaveSearch() public method

Performs the Favourites method: Save Search. POST

Serializes the given SaveSearchRequest into xml.

REQUIRES AUTHENTICATION.
public SaveSearch ( SaveSearchRequest saveSearch ) : System.Xml.Linq.XDocument
saveSearch SaveSearchRequest The object that will be serialized into xml and then sent in a POST message.
return System.Xml.Linq.XDocument

SaveSeller() public method

Performs the Favourites method: Save Seller. POST

Serializes the given SaveSellerRequest into xml.

REQUIRES AUTHENTICATION.
public SaveSeller ( SaveSellerRequest saveSeller ) : System.Xml.Linq.XDocument
saveSeller SaveSellerRequest The object that will be serialized into xml and then sent in a POST message.
return System.Xml.Linq.XDocument

UpdateSavedFavorite() public method

Performs the Favourites method: Modifies the email frequency for a saved favourite. POST

REQUIRES AUTHENTICATION.
public UpdateSavedFavorite ( string favoriteId, string type, string frequency ) : System.Xml.Linq.XDocument
favoriteId string The ID of the favourite.
type string The type of favourite (must be “Category”, “Search”, “AttributeSearch” or “Seller”).
frequency string The frequency that emails should be sent (must be “None”, “Daily”, “Every3Days” or “Weekly”).
return System.Xml.Linq.XDocument