The FavouriteMethods class contains the methods requried for making calls to the API related to Favourites.
Example #1
0
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Modifies the email frequency for a saved favourite. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="favoriteId">The ID of the favourite.</param>
        /// <param name="type">The type of favourite (must be “Category”, “Search”, “AttributeSearch” or “Seller”).</param>
        /// <param name="frequency">The frequency that emails should be sent (must be “None”, “Daily”, “Every3Days” or “Weekly”).</param>
        /// <returns>XDocument.</returns>
        public XDocument UpdateSavedFavorite(string favoriteId, string type, string frequency)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.UpdateSavedFavorite(favoriteId, type, frequency);
        }
Example #2
0
        // Favourite methods:
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Save Search.
        /// </para>
        /// <para>Serializes the given SaveSearchRequest into xml.</para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="saveSearch">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument.</returns>
        public XDocument SaveSearch(SaveSearchRequest saveSearch)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.SaveSearch(saveSearch);
        }
Example #3
0
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Save Seller.
        /// </para>
        /// <para>Serializes the given SaveSellerRequest into xml.</para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="saveSeller">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument.</returns>
        public XDocument SaveSeller(SaveSellerRequest saveSeller)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.SaveSeller(saveSeller);
        }
Example #4
0
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Save Category.
        /// </para>
        /// <para>Serializes the given SaveCategoryRequest into xml.</para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="saveCategory">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument.</returns>
        public XDocument SaveCategory(SaveCategoryRequest saveCategory)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.SaveCategory(saveCategory);
        }
Example #5
0
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Retrieve Favourite Sellers.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>SavedSellers.</returns>
        public SavedSellers RetrieveFavouriteSellers()
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.RetrieveFavouriteSellers();
        }
Example #6
0
        /// <summary>
        /// <para>Performs the Favourites Method:
        /// Retrieve Favourite Searches.
        /// </para>
        /// REQURIES AUTHENTICATION.
        /// </summary>
        /// <param name="filter">The filter for the favourite searches.</param>
        /// <returns>SaveSearches.</returns>
        public SavedSearches RetrieveFavouriteSearches(SavedSearchType filter)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.RetrieveFavouriteSearches(filter);
        }
Example #7
0
        /// <summary>
        /// <para>Performs the Favourites Method:
        /// Retrieve Favourite Categories.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>SavedCategories.</returns>
        public SavedCategories RetrieveFavouriteCategories()
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.RetrieveFavouriteCategories();
        }
Example #8
0
        /// <summary>
        /// <para>Performs the Favourites method:
        /// Deletes a saved search, category or seller from the currently authenticated user’s favourites. DELETE
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="favoriteId">The ID of the favourite.</param>
        /// <param name="type">The type of favourite (must be “Category”, “Search”, “AttributeSearch” or “Seller”).</param>
        /// <returns>XDocument.</returns>
        public XDocument RemoveSavedFavorite(string favoriteId, string type)
        {
            if (_favourites == null)
            {
                _favourites = new FavouriteMethods(_connection);
            }

            return _favourites.RemoveSavedFavorite(favoriteId, type);
        }