Exemple #1
0
        public ProductResultSet SearchProducts(string query, int page, int perPage,
                    int[] programmeIds, int[] excludedProgrammeIds, int[] excludedProgrammeCategoryIds,
                    int[] feedIds, int level1CategoryId, int level2CategoryId, bool includeAdult,
                    string lid, ProductField sort, SortOrder sortOrder)
        {
            BuyatAffiliateProductSearchParameters searchParams = new BuyatAffiliateProductSearchParameters();
            searchParams.query = query;
            if (page != -1)
            {
                searchParams.page = page.ToString();
            }
            if (perPage != -1)
            {
                searchParams.perpage = perPage.ToString();
            }
            if (programmeIds != null)
            {
                searchParams.programme_ids = Implode(programmeIds, ",");
            }
            if (programmeIds != null)
            {
                searchParams.excluded_programme_ids = Implode(excludedProgrammeIds, ",");
            }
            if (programmeIds != null)
            {
                searchParams.excluded_programme_category_ids = Implode(excludedProgrammeCategoryIds, ",");
            }
            if (programmeIds != null)
            {
                searchParams.feed_ids = Implode(feedIds, ",");
            }
            if (level1CategoryId != -1)
            {
                searchParams.level1_category_id = level1CategoryId.ToString();
            }
            if (level2CategoryId != -1)
            {
                searchParams.level2_category_id = level2CategoryId.ToString();
            }
            searchParams.include_adult = includeAdult;
            searchParams.lid = lid;
            searchParams.sort = (BuyatAffiliateEntitiesSortType)Enum.ToObject(typeof(BuyatAffiliateEntitiesSortType), sort);
            searchParams.sortorder = (BuyatAffiliateEntitiesSortOrder)Enum.ToObject(typeof(BuyatAffiliateEntitiesSortOrder), sortOrder);

            BuyatAffiliateProductSearchResponse searchResponse = binding.buyatAffiliateProductSearch(apiKey, searchParams);
            return new ProductResultSet(this, searchResponse);
        }
 /// <remarks/>
 public void buyatAffiliateProductSearchAsync(string api_key, BuyatAffiliateProductSearchParameters parameters, object userState) {
     if ((this.buyatAffiliateProductSearchOperationCompleted == null)) {
         this.buyatAffiliateProductSearchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnbuyatAffiliateProductSearchOperationCompleted);
     }
     this.InvokeAsync("buyatAffiliateProductSearch", new object[] {
                 api_key,
                 parameters}, this.buyatAffiliateProductSearchOperationCompleted, userState);
 }
 /// <remarks/>
 public void buyatAffiliateProductSearchAsync(string api_key, BuyatAffiliateProductSearchParameters parameters) {
     this.buyatAffiliateProductSearchAsync(api_key, parameters, null);
 }
 /// <remarks/>
 public System.IAsyncResult BeginbuyatAffiliateProductSearch(string api_key, BuyatAffiliateProductSearchParameters parameters, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("buyatAffiliateProductSearch", new object[] {
                 api_key,
                 parameters}, callback, asyncState);
 }
 public BuyatAffiliateProductSearchResponse buyatAffiliateProductSearch(string api_key, BuyatAffiliateProductSearchParameters parameters) {
     object[] results = this.Invoke("buyatAffiliateProductSearch", new object[] {
                 api_key,
                 parameters});
     return ((BuyatAffiliateProductSearchResponse)(results[0]));
 }