public void KategoriOzellikVeDegerGosterme(int _categoryIdValue) { String strAppKey = "66e296ef-ba12-4c7a-8d3f-67027f1e1962"; String strAppSecret = "OiVekmVJRKC2wi0X"; int currentPageVal = 0; int pageSizeVal = 100; int categoryIdValue = _categoryIdValue; Authentication authentication = new Authentication(); authentication.appKey = strAppKey; authentication.appSecret = strAppSecret; GetCategoryAttributesRequest request = new GetCategoryAttributesRequest(); request.auth = authentication; request.categoryId = categoryIdValue; RequestPagingData pagingData = new RequestPagingData(); pagingData.currentPage = currentPageVal; pagingData.pageSize = pageSizeVal; request.pagingData = pagingData; CategoryServicePortService port = new CategoryServicePortService(); GetCategoryAttributesResponse response = port.GetCategoryAttributes(request); //response.category List <CategoryAttributeData> categoryAttributes = response.category.attributeList.ToList <CategoryAttributeData>(); List <CategoryAttributeData> attributeData = categoryAttributes.ToList <CategoryAttributeData>(); foreach (CategoryAttributeData item in attributeData) { foreach (var item2 in item.valueList) { } } //for (CategoryAttributeData sampleAttributeData : attributeData // ) //{ // List<CategoryAttributeValueData> sampleAttValueDataList = sampleAttributeData.getValueList().getValue(); // for (CategoryAttributeValueData sampleAttValueData : sampleAttValueDataList // ) // { // System.out.println(sampleAttributeData.getId() + " " + sampleAttributeData.getName() + " " + sampleAttValueData.getName() + " (" + sampleAttValueData.getId() + ", " + sampleAttValueData.getDependedName() + ")"); // } //} }
public SubCategory[] GetTopCategories() { com.n11Category.api.Authentication authentication = new com.n11Category.api.Authentication(); authentication.appKey = apiKey; authentication.appSecret = apiSecret; GetTopLevelCategoriesRequest getTopLevelCategories = new GetTopLevelCategoriesRequest(); getTopLevelCategories.auth = authentication; CategoryServicePortService port = new CategoryServicePortService(); GetTopLevelCategoriesResponse getTopLevelCategoriesResponse = port.GetTopLevelCategories(getTopLevelCategories); SubCategory[] subCategories = getTopLevelCategoriesResponse.categoryList; return(subCategories); }
public List <SubCategory> GetTopLevelCategories() { var authentication = new Authentication(); authentication.appKey = "e2a9be17-8473-4efb-9e53-e29d87e0368b"; authentication.appSecret = "O6PInuTZN0z1QZsn"; GetTopLevelCategoriesRequest request = new GetTopLevelCategoriesRequest(); request.auth = authentication; CategoryServicePortService port = new CategoryServicePortService(); GetTopLevelCategoriesResponse topTopLevelCategoriesResponse = port.GetTopLevelCategories(request); List <SubCategory> categoryList = topTopLevelCategoriesResponse.categoryList.ToList(); return(categoryList); }
public List <SubCategoryData> GetSubCategories(long cid) { var authentication = new Authentication(); authentication.appKey = "e2a9be17-8473-4efb-9e53-e29d87e0368b"; authentication.appSecret = "O6PInuTZN0z1QZsn"; GetSubCategoriesRequest request = new GetSubCategoriesRequest(); request.auth = authentication; request.categoryId = cid; CategoryServicePortService port = new CategoryServicePortService(); GetSubCategoriesResponse response = port.GetSubCategories(request); List <SubCategoryData> categoryList = response.category.ToList(); return(categoryList); }
public ParentCategoryData GetParentCategory(long categoryId) { com.n11Category.api.Authentication authentication = new com.n11Category.api.Authentication { appKey = apiKey, appSecret = apiSecret }; GetParentCategoryRequest getParentCategoryRequest = new GetParentCategoryRequest(); getParentCategoryRequest.auth = authentication; getParentCategoryRequest.categoryId = categoryId; CategoryServicePortService port = new CategoryServicePortService(); GetParentCategoryResponse getParentCategoryResponse = port.GetParentCategory(getParentCategoryRequest); ParentCategoryData category = getParentCategoryResponse.category; return(category); }
public SubCategory[] GetSubCategories(long categoryId) { com.n11Category.api.Authentication authentication = new com.n11Category.api.Authentication { appKey = apiKey, appSecret = apiSecret }; GetSubCategoriesRequest getSubCategoriesRequest = new GetSubCategoriesRequest(); getSubCategoriesRequest.auth = authentication; getSubCategoriesRequest.categoryId = categoryId; CategoryServicePortService port = new CategoryServicePortService(); GetSubCategoriesResponse getSubCategoriesResponse = port.GetSubCategories(getSubCategoriesRequest); SubCategory[] subCategories = getSubCategoriesResponse.category[0].subCategoryList; return(subCategories); }
public void Getir() { try { String strAppKey = "***"; String strAppSecret = "***"; Authentication authentication = new Authentication(); authentication.appKey = strAppKey; authentication.appSecret = strAppSecret; GetTopLevelCategoriesRequest request = new GetTopLevelCategoriesRequest(); request.auth = authentication; CategoryServicePortService port = new CategoryServicePortService(); GetTopLevelCategoriesResponse topTopLevelCategoriesResponse = port.GetTopLevelCategories(request); List <SubCategory> categoryList = topTopLevelCategoriesResponse.categoryList.ToList <SubCategory>(); } catch (Exception) { throw; } }
public void main(long _categoryIdVal) { String strAppKey = "66e296ef-ba12-4c7a-8d3f-67027f1e1962"; String strAppSecret = "OiVekmVJRKC2wi0X"; long categoryIdVal = _categoryIdVal; GetCategoryAttributesIdRequest request = new GetCategoryAttributesIdRequest(); GetCategoryAttributesRequest remk = new GetCategoryAttributesRequest(); Authentication authentication = new Authentication(); authentication.appKey = strAppKey; authentication.appSecret = strAppSecret; RequestPagingData pagingData = new RequestPagingData(); pagingData.currentPage = currentPageVal; pagingData.pageSize = pageSizeVal; //request.pagingData = pagingData; request.auth = authentication; request.categoryId = categoryIdVal; CategoryServicePortService port = new CategoryServicePortService(); GetCategoryAttributesIdResponse response = port.GetCategoryAttributesId(request); List <CategoryProductAttributeData> valueList = response.categoryProductAttributeList.ToList <CategoryProductAttributeData>(); foreach (CategoryProductAttributeData item in valueList) // buradan kategorilerin ozellikleri geliyor sanırım { } //for (CategoryProductAttributeData sampleValue:valueList) //{ // System.out.println("Özellik ID : " + sampleValue.getId() + " Özellik Adı: " + sampleValue.getName()); //} }