Пример #1
0
        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);
        }
Пример #2
0
        private static SubCategoryData[] getSubCat(long CatId)
        {
            var authentication1 = new n11Api.ServiceReference1.Authentication();

            authentication1.appKey    = apiAnahtari1; //api anahtarınız
            authentication1.appSecret = apiSifresi1;  //api şifeniz


            CategoryServicePortClient port = new CategoryServicePortClient();

            GetSubCategoriesRequest getSubbCatt = new GetSubCategoriesRequest();

            getSubbCatt.categoryId = CatId;
            getSubbCatt.auth       = authentication1;
            GetSubCategoriesResponse response = port.GetSubCategories(getSubbCatt);
            var subCategory = response.category;

            return(subCategory);
        }
Пример #3
0
        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);
        }