mobfirst-vtex-filters-pod 0.1.5

mobfirst-vtex-filters-pod 0.1.5

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最新版本2017年7月

Diego Merks 维护。



  • 作者:
  • Diego Merks

mobfirst-vtex-filters-pod

[![CI 状态](http://img.shields.io/travis/Diego Merks/mobfirst-vtex-filters-pod.svg?style=flat)](https://travis-ci.org/Diego Merks/mobfirst-vtex-filters-pod) 版本 许可证 平台

示例

Filter *filter1 = [[Filter alloc] initWithStoreUrl:@"http://estoque.com.br" andCategory:@"/infantil/"];
[filter1 getFacetsFromStoreWithCompletionHandler:^(FacetsReturnObject *facetsReturnObject) {

	Brand *brand = [[facetsReturnObject brands] objectAtIndex:0];
	Brand *brand2 = [[facetsReturnObject brands] objectAtIndex:2];
	[brand setState:YES];
	[brand2 setState:YES];

	SpecificationFilter *filter = [[facetsReturnObject specificationFilters] objectAtIndex:1];
	SpecificationFilterItem *azul = [[filter specificationFilterItems] objectAtIndex:0];
	SpecificationFilterItem *branco = [[filter specificationFilterItems] objectAtIndex:1];

	[azul setState:YES];
	[branco setState:YES];

	NSMutableArray *filterItems = [[NSMutableArray alloc] init];
	[filterItems addObject:azul];
	[filterItems addObject:branco];

	SpecificationFilter *enabledSpecificationFilters = [[SpecificationFilter alloc] initWithName:@"Cor" andItems:filterItems];
	NSArray *specificationFiltersArray = [NSArray arrayWithObject:enabledSpecificationFilters];

	NSMutableArray *brandArray = [NSMutableArray arrayWithObject:brand];
	[brandArray addObject:brand2];

	FacetsReturnObject *enabledFilters = [[FacetsReturnObject alloc] initWithBrands:brandArray specificationFilters:specificationFiltersArray andChildCategories:nil];

	NSString *url = [filter1 getUrlFromFilters:enabledFilters withTextFilter:nil];
	printf("%s", [url UTF8String]);
}];

要求

安装

mobfirst-vtex-filters-pod 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "mobfirst-vtex-filters-pod"

作者

Diego Merks, [email protected]

许可证

mobfirst-vtex-filters-pod 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。